diff options
author | Andrey Andreev <narf@devilix.net> | 2014-05-09 11:30:59 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-05-09 11:30:59 +0200 |
commit | 1ffa223bd3d201d00170b3376bdc099ea8f12957 (patch) | |
tree | e3f2fb7826e5e00cd4891d14aa9053be086074f0 | |
parent | 263e8fe0978e606137176135f0737c1dee319f0e (diff) |
Suppress PHP 5.6 E_DEPRECATED warnings for mbstring.internal_encoding as well
-rw-r--r-- | system/core/CodeIgniter.php | 4 | ||||
-rw-r--r-- | tests/Bootstrap.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index a7118bfc7..1c6e76b4f 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -209,7 +209,9 @@ if ( ! is_php('5.4')) if (extension_loaded('mbstring')) { define('MB_ENABLED', TRUE); - ini_set('mbstring.internal_encoding', $charset); + // mbstring.internal_encoding is deprecated starting with PHP 5.6 + // and it's usage triggers E_DEPRECATED messages. + @ini_set('mbstring.internal_encoding', $charset); // This is required for mb_convert_encoding() to strip invalid characters. // That's utilized by CI_Utf8, but it's also done for consistency with iconv. mb_substitute_character('none'); diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 195fc0dca..cc84abf28 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -46,7 +46,7 @@ ini_set('default_charset', 'UTF-8'); if (extension_loaded('mbstring')) { defined('MB_ENABLED') OR define('MB_ENABLED', TRUE); - ini_set('mbstring.internal_encoding', 'UTF-8'); + @ini_set('mbstring.internal_encoding', 'UTF-8'); mb_substitute_character('none'); } else |