From 0d782ed35e22a70dc99edc11ad004ebfd348f6f1 Mon Sep 17 00:00:00 2001 From: NielsH Date: Mon, 15 Jun 2015 20:31:26 +0200 Subject: [PATCH 1/2] [-] MO : Remove duplicate $id_shop parameters Remove duplicate definition of $id_shop in the getCMSPages() function. PHP7 will not accept this and returns a fatal error upon encountering this. (cherry picked from commit eadf84b21dd2736669887e8f0c57b2ca38607dfb) (cherry picked from commit c7ceb52e124b40cc40cdfab336bec16006d14397) Conflicts: blocktopmenu.php --- blocktopmenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocktopmenu.php b/blocktopmenu.php index d22787b..649ee15 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -794,7 +794,7 @@ class Blocktopmenu extends Module } } - protected function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false, $id_shop = false) + protected function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false) { $id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id; $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; From 06ba75fee02c8bee5af4c0113fed7f0480065e28 Mon Sep 17 00:00:00 2001 From: Sacha FROMENT Date: Thu, 2 Jul 2015 12:18:22 +0200 Subject: [PATCH 2/2] [-] MO : Correct sended parameters (cherry picked from commit 909b2cf7b4aea51bd8c0f2ea1fe5adf3355fec4e) Conflicts: blocktopmenu.php --- blocktopmenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocktopmenu.php b/blocktopmenu.php index 649ee15..aa384a4 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -685,7 +685,7 @@ class Blocktopmenu extends Module $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; $id_shop = ($id_shop !== false) ? $id_shop : Context::getContext()->shop->id; $categories = $this->getCMSCategories(false, (int)$parent, (int)$id_lang, (int)$id_shop); - $pages = $this->getCMSPages((int)$parent, false, (int)$id_lang, (int)$id_shop); + $pages = $this->getCMSPages((int)$parent, (int)$id_shop, (int)$id_lang); $spacer = str_repeat(' ', $this->spacer_size * (int)$depth);