diff --git a/ChangeLog b/ChangeLog index a4657a2fe4..0d4fd18522 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,7 @@ phpMyAdmin - ChangeLog - issue #11784 Properly handle errors in upacking zip archive - issue #11785 Set PHP's internal encoding to UTF-8 - issue #11786 Fixed Kanji encoding in some specific cases +- issue #11787 Check whether iconv works before using it 4.5.3.1 (2015-12-25) - issue #11774 Undefined offset 2 diff --git a/libraries/charset_conversion.lib.php b/libraries/charset_conversion.lib.php index e3dd9a40ab..5d2e076a1b 100644 --- a/libraries/charset_conversion.lib.php +++ b/libraries/charset_conversion.lib.php @@ -41,7 +41,13 @@ if ($GLOBALS['cfg']['RecodingEngine'] == 'iconv') { PMA_warnMissingExtension('mbstring'); } } elseif ($GLOBALS['cfg']['RecodingEngine'] == 'auto') { - if (@function_exists('iconv')) { + /* + * We also need to verify iconv works, see + * https://github.com/phpmyadmin/phpmyadmin/issues/11787/ + * and + * https://bugs.php.net/bug.php?id=44096 + */ + if (@function_exists('iconv') && @iconv_strlen('', 'cp1250') !== false) { $PMA_recoding_engine = PMA_getIconvRecodingEngine(); } elseif (@function_exists('recode_string')) { $PMA_recoding_engine = PMA_CHARSET_RECODE;