MDL-33007 add workaround for broken iconv //IGNORE

This patch adds mbstring utf-8 cleanup fallback and admin warning if no utf-8 cleanup possible in user submitted data.
This commit is contained in:
Petr Skoda 2012-05-15 23:07:10 +02:00
parent 3681e78429
commit 0aff15c2c9
6 changed files with 48 additions and 15 deletions

View file

@ -73,11 +73,6 @@ if (!function_exists('iconv')) {
echo 'Moodle requires the iconv PHP extension. Please install or enable the iconv extension.';
die();
}
if (iconv('UTF-8', 'UTF-8//IGNORE', 'abc') !== 'abc') {
// known to be broken in mid-2011 MAMP installations
echo 'Broken iconv PHP extension detected, installation can not continue.';
die;
}
if (PHP_INT_SIZE > 4) {
// most probably 64bit PHP - we need a lot more memory