пятница, 21 марта 2014 г.

Ошибка при установке расширения "MegaDeal" для Joomla 3.2.3 на XAMPP 3.2.1

При открытии консоли установки расширения MegaDeal появляется сообщение:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in \home\soft\xampp\htdocs\2\libraries\joomla\filter\input.php on line 652
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in \home\soft\xampp\htdocs\2\libraries\joomla\filter\input.php on line 654
Решение нашел здесь:

jlbeltrami wrote:
To succeed in installing joomla_3.1.5!, you need to patch a php file.

In libraries/joomla/filter/input.php line 656 and 659

joomla! uses preg-replace() with the /e option whom is deprecated
the code sequence should be replaced by the following :

// $source = preg_replace('/&#(\d+);/me', "utf8_encode(chr(\\1))", $source); // decimal notation
$source = preg_replace_callback('/&#(\d+);/m',
function($matches) {
return utf8_encode(chr($matches[0]));
},
$source);

// Convert hex
// $source = preg_replace('/&#x([a-f0-9]+);/mei', "utf8_encode(chr(0x\\1))", $source); // hex notation
$source = preg_replace_callback('/&#x([a-f0-9]+);/mi',
function($matches) {
return utf8_encode(chr('0x'.$matches[0]));
},
$source);

I did it and succeded to install joomla!

Комментариев нет:

Архив