From 5fcc504557b4a2f3df54b1dc4719f21465aec22b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 13 Nov 2016 08:57:39 +1030 Subject: [PATCH] Prevent notice if bootstrapping app in command line environment --- framework/core/src/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Foundation/Application.php b/framework/core/src/Foundation/Application.php index 9c411c750..dc68ce9cf 100644 --- a/framework/core/src/Foundation/Application.php +++ b/framework/core/src/Foundation/Application.php @@ -164,7 +164,7 @@ class Application extends Container implements ApplicationContract public function url($path = null) { $config = $this->isInstalled() ? $this->make('flarum.config') : []; - $url = array_get($config, 'url', $_SERVER['REQUEST_URI']); + $url = array_get($config, 'url', array_get($_SERVER, 'REQUEST_URI')); if (is_array($url)) { if (isset($url[$path])) {