Merge pull request #481 from th-h/thh-476

Fix broken compat layer.
This commit is contained in:
Mario Hommel 2017-04-09 00:55:21 +02:00 committed by GitHub
commit 9365836307

View File

@ -518,9 +518,6 @@ if (function_exists('date_default_timezone_get')) {
* native encoded strings containing umlauts. This wrapper should to be used in the core until PHP 5.6 fixes the bug.
*/
function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) {
if (!is_string($string)) {
return '';
}
if ($flags == null) {
if (defined('ENT_HTML401')) {
// Added with PHP 5.4.x
@ -544,9 +541,6 @@ function serendipity_specialchars($string, $flags = null, $encoding = LANG_CHARS
* see serendipity_specialchars
*/
function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET, $double_encode = true) {
if (!is_string($string)) {
return '';
}
if ($flags == null) {
if (defined('ENT_HTML401')) {
// Added with PHP 5.4.x
@ -566,9 +560,6 @@ function serendipity_entities($string, $flags = null, $encoding = LANG_CHARSET,
* serendipity_specialchars
*/
function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHARSET) {
if (!is_string($string)) {
return '';
}
if ($flags == null) {
# NOTE: ENT_SUBSTITUTE does not exist for this function, and the documentation does not specify that it will
# ever echo empty strings on charset errors