From 2e2151a1bbf060f068d8251ef319a2400f471f00 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Fri, 18 Oct 2013 15:23:14 +0200 Subject: [PATCH] [-] CORE : error_get_last > PHP 5.1 --- config/alias.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/alias.php b/config/alias.php index 9c4cbb36a..7f870ef23 100644 --- a/config/alias.php +++ b/config/alias.php @@ -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).':
'.$error['message']; }