giovedì 12 settembre 2013

Errore Installazione Joomla 2.5.14 con PHP 5.5

L'installazione genera l'errore
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ~\libraries\joomla\filter\input.php on line 664

E' un bug di Joomla e per correggerlo bisogna seguire le istruzioni alla pagina
https://github.com/joomla/joomla-cms/pull/1309

Ho sistemato così le righe:
// Convert decimal
// - Eliminata e sostituita con la successiva (Bug https://github.com/joomla/joomla-cms/pull/1309) $source = preg_replace('/&#(\d+);/me', "utf8_encode(chr(\\1))", $source); // decimal notation
$source = preg_replace_callback('/&#x(\d+);/mi', function($m){return utf8_encode(chr('0x'.$m[1]));}, $source); // decimal notation

// Convert hex
// - Eliminata e sostituita con la successiva (Bug https://github.com/joomla/joomla-cms/pull/1309) $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($m){return utf8_encode(chr('0x'.$m[1]));}, $source); // hex notation



;-)

Nessun commento: