Skip to content

Commit

Permalink
fixed #2406
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ueberschaer authored and craigh committed Jun 28, 2015
1 parent 7e339f3 commit ceefba6
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 5 deletions.
14 changes: 13 additions & 1 deletion src/jcss.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@
*/

include 'lib/bootstrap.php';
ini_set('mbstring.internal_encoding', 'UTF-8');

/**
* mbstring.internal_encoding
*
* This feature has been deprecated as of PHP 5.6.0. Relying on this feature is highly discouraged.
* PHP 5.6 and later users should leave this empty and set default_charset instead.
*
* @link http://php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
*/
if (version_compare(\PHP_VERSION, '5.6.0', '<')) {
ini_set('mbstring.internal_encoding', 'UTF-8');
}

ini_set('default_charset', 'UTF-8');
global $ZConfig;
$f = (isset($_GET['f']) ? filter_var($_GET['f'], FILTER_SANITIZE_STRING) : false);
Expand Down
14 changes: 13 additions & 1 deletion src/lib/Zikula/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@
define('ACCESS_ADD', 600);
define('ACCESS_DELETE', 700);
define('ACCESS_ADMIN', 800);
ini_set('mbstring.internal_encoding', 'UTF-8');

/**
* mbstring.internal_encoding
*
* This feature has been deprecated as of PHP 5.6.0. Relying on this feature is highly discouraged.
* PHP 5.6 and later users should leave this empty and set default_charset instead.
*
* @link http://php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
*/
if (version_compare(\PHP_VERSION, '5.6.0', '<')) {
ini_set('mbstring.internal_encoding', 'UTF-8');
}

ini_set('default_charset', 'UTF-8');
mb_regex_encoding('UTF-8');

Expand Down
2 changes: 1 addition & 1 deletion src/lib/i18n/ZMO.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function __construct(StreamReader_Abstract $reader, $enable_cache = true)
$this->total = $this->readint();
$this->originals = $this->readint();
$this->translations = $this->readint();
$this->encoding = ini_get('mbstring.internal_encoding');
$this->encoding = (version_compare(\PHP_VERSION, '5.6.0', '<')) ? ini_get('mbstring.internal_encoding') : ini_get('default_charset');
}

/**
Expand Down
13 changes: 12 additions & 1 deletion src/mo2json.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
* information regarding copyright and licensing.
*/

ini_set('mbstring.internal_encoding', 'UTF-8');
/**
* mbstring.internal_encoding
*
* This feature has been deprecated as of PHP 5.6.0. Relying on this feature is highly discouraged.
* PHP 5.6 and later users should leave this empty and set default_charset instead.
*
* @link http://php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
*/
if (version_compare(\PHP_VERSION, '5.6.0', '<')) {
ini_set('mbstring.internal_encoding', 'UTF-8');
}

ini_set('default_charset', 'UTF-8');
mb_regex_encoding('UTF-8');

Expand Down
13 changes: 12 additions & 1 deletion src/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
* information regarding copyright and licensing.
*/

ini_set('mbstring.internal_encoding', 'UTF-8');
/**
* mbstring.internal_encoding
*
* This feature has been deprecated as of PHP 5.6.0. Relying on this feature is highly discouraged.
* PHP 5.6 and later users should leave this empty and set default_charset instead.
*
* @link http://php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
*/
if (version_compare(\PHP_VERSION, '5.6.0', '<')) {
ini_set('mbstring.internal_encoding', 'UTF-8');
}

ini_set('default_charset', 'UTF-8');
mb_regex_encoding('UTF-8');
ini_set('memory_limit', '64M');
Expand Down

0 comments on commit ceefba6

Please sign in to comment.