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

This commit is contained in:
Damien Metzger committed 2012-12-13 19:06:10 +01:00
1 parent e7e156c261
commit be5b678f85
2 files changed
+9

No files matched your search

+7
View File
@@ -71,6 +71,13 @@ function bqSQL($string)
return str_replace('`', '\`', pSQL($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 * @deprecated
*/ */
@@ -68,6 +68,8 @@ class AdminModulesControllerCore extends AdminController
{ {
parent::__construct(); parent::__construct();
register_shutdown_function('displayFatalError');
include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php'); include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php');
// Set the modules categories // Set the modules categories