From c5814c32fdb069888d9b03f7d0bf1d45c2c84cbe Mon Sep 17 00:00:00 2001 From: sThiebaut Date: Fri, 30 Dec 2011 10:28:49 +0000 Subject: [PATCH] [-] BO : fixed undefined variable in AdminModulesController git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11925 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminModulesController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 1b2a7fd6f..e3bdee106 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -558,7 +558,12 @@ class AdminModulesControllerCore extends AdminController if (Tools::getValue('controller') != '') $_POST['tab'] = Tools::safeOutput(Tools::getValue('controller')); - if (((method_exists($module, $method) && ($echo = $module->{$method}()))) AND $key == 'configure' AND Module::isInstalled($module->name)) + if (!method_exists($module, $method)) + throw new PrestashopException('Method can\'t be found'); + + $echo = $module->{$method}(); + + if ($key == 'configure' AND Module::isInstalled($module->name)) { $backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name; $hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;