// Handle fatal error in modules (after an upgrade for example)

This commit is contained in:
Damien Metzger
2012-12-13 19:06:10 +01:00
parent 28a3856bfa
commit ec760c6eef
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -71,6 +71,13 @@ function bqSQL($string)
return str_replace('`', '\`', pSQL($string));
}
function displayFatalError()
{
$error = error_get_last();
if ($error !== NULL)
echo '[PrestaShop] Fatal error in module '.substr(basename($error['file']), 0, -4).':<br />'.$error['message'];
}
/**
* @deprecated
*/
@@ -68,6 +68,8 @@ class AdminModulesControllerCore extends AdminController
{
parent::__construct();
register_shutdown_function('displayFatalError');
include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php');
// Set the modules categories