[-] CORE : error_get_last > PHP 5.1

This commit is contained in:
gRoussac
2013-10-18 15:29:12 +02:00
parent 8a682081de
commit 2e2151a1bb
+4 -2
View File
@@ -73,8 +73,10 @@ function bqSQL($string)
function displayFatalError()
{
$error = error_get_last();
if ($error !== NULL && in_array($error['type'], array(E_ERROR, E_PARSE)))
$error = null;
if (function_exists('error_get_last'))
$error = error_get_last();
if ($error !== NULL && in_array($error['type'], array(E_ERROR, E_PARSE, E_COMPILE_ERROR )))
echo '[PrestaShop] Fatal error in module '.substr(basename($error['file']), 0, -4).':<br />'.$error['message'];
}