Prevent notice if bootstrapping app in command line environment

This commit is contained in:
Toby Zerner 2016-11-13 08:57:39 +10:30
parent 327949495d
commit 5fcc504557

View File

@ -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])) {