mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 22:59:57 +08:00
Prevent notice if bootstrapping app in command line environment
This commit is contained in:
@ -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])) {
|
||||
|
Reference in New Issue
Block a user