[-] Core : do not die in production mode! #PSCFV-5751

This commit is contained in:
Damien Metzger committed 2012-12-18 11:48:50 +01:00
1 parent 122c3e5a86
commit 7869a43d16
1 file changed
+6 -1
+6 -1
View File
@@ -855,7 +855,12 @@ abstract class ModuleCore
public static function getInstanceByName($module_name) public static function getInstanceByName($module_name)
{ {
if (!Validate::isModuleName($module_name)) if (!Validate::isModuleName($module_name))
die(Tools::displayError()); {
if (_PS_MODE_DEV_)
die(Tools::displayError());
return false;
}
if (!isset(self::$_INSTANCE[$module_name])) if (!isset(self::$_INSTANCE[$module_name]))
{ {
if (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php')) if (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php'))