Jump to content

[PATCH sur V1.1] Vérifier existence du HOOK lors d'une opération de greffe de module


Domi91

Recommended Posts

Fichier : prestashop\classes\Module.php line 137

   public function registerHook($hook_name)
   {
       if (!Validate::isHookName($hook_name))
           die(Tools::displayError());
       if (!isset($this->id) OR !is_numeric($this->id))
           return false;

       // START of PATCH
       $module = self::getInstanceById(intval($this->id));
       if (!$module)
           return false;
       if (!method_exists($module, 'hook'.$hook_name))
           return false;
       unset($module);
       // END of PATCH
... Suite du code ...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...