Merge pull request #46 from djfm/feat/starter-theme

// fixed notice when REQUEST_SCHEME not defined
This commit is contained in:
François-Marie de Jouvencel
2015-10-19 14:13:32 +02:00
+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]";
} }
} }