From c3b9088fc7e31b2b69ef4aaabdc3e89bb1f55b6c Mon Sep 17 00:00:00 2001 From: Timm Friebe Date: Thu, 7 Jan 2016 23:24:04 +0100 Subject: [PATCH] Only set internal_encoding for iconv with PHP < 5.6 Doing so has been deprecated and replaced by the setting "default_charset", see https://wiki.php.net/rfc/default_encoding. Since its default value is UTF-8 (which == xp::ENCODING), we do not have to do anything for PHP 5.6+ --- shared/src/class-main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/src/class-main.php b/shared/src/class-main.php index 93f0446..1facb31 100755 --- a/shared/src/class-main.php +++ b/shared/src/class-main.php @@ -72,7 +72,7 @@ // Start I/O layers $encoding= get_cfg_var('encoding'); -iconv_set_encoding('internal_encoding', \xp::ENCODING); +PHP_VERSION < '5.6' && iconv_set_encoding('internal_encoding', \xp::ENCODING); array_shift($_SERVER['argv']); array_shift($argv); if ($encoding) {