[-] BO : #PSCFV-2758 : fix error when use Tools::displayErrors()
This commit is contained in:
@@ -837,7 +837,7 @@ 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::displayErrors());
|
die(Tools::displayError());
|
||||||
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'))
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$id_product = (int)Tools::getValue($this->identifier);
|
$id_product = (int)Tools::getValue($this->identifier);
|
||||||
$res = $attachment->attachProduct($id_product);
|
$res = $attachment->attachProduct($id_product);
|
||||||
if (!$res)
|
if (!$res)
|
||||||
$this->errors[] = Tools::displayErrors('Unable to associate this attachment to product');
|
$this->errors[] = Tools::displayError('Unable to associate this attachment to product');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user