From 1ffa223bd3d201d00170b3376bdc099ea8f12957 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 May 2014 12:30:59 +0300 Subject: Suppress PHP 5.6 E_DEPRECATED warnings for mbstring.internal_encoding as well --- system/core/CodeIgniter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system') 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'); -- cgit v1.2.3-24-g4f1b