From de0868c8fc8908789c52a53bfc99428fdb5681f9 Mon Sep 17 00:00:00 2001 From: djfm Date: Mon, 19 Oct 2015 14:12:59 +0200 Subject: [PATCH] // fixed notice when REQUEST_SCHEME not defined --- blocktopmenu.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blocktopmenu.php b/blocktopmenu.php index 41150a3..45481d2 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -1392,7 +1392,11 @@ class Blocktopmenu extends Module implements WidgetInterface } else if ($controllerName === 'index') { return 'shop-' . $this->context->shop->id; } else { - return "$_SERVER[REQUEST_SCHEME]://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + $scheme = 'http'; + if (array_key_exists('REQUEST_SCHEME', $_SERVER)) { + $scheme = $_SERVER['REQUEST_SCHEME']; + } + return "$scheme://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; } }