// fixed notice when REQUEST_SCHEME not defined

This commit is contained in:
djfm
2015-10-19 14:12:59 +02:00
parent b11e9637c7
commit de0868c8fc
+5 -1
View File
@@ -1392,7 +1392,11 @@ class Blocktopmenu extends Module implements WidgetInterface
} else if ($controllerName === 'index') { } else if ($controllerName === 'index') {
return 'shop-' . $this->context->shop->id; return 'shop-' . $this->context->shop->id;
} else { } 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]";
} }
} }