// Handle fatal error in modules (after an upgrade for example)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user