Skip to content

Commit

Permalink
Removing bad array references that broke in PHP 7.4 as a result of ca…
Browse files Browse the repository at this point in the history
…lling an array offset on a null value/property (#113)
  • Loading branch information
thekanbo authored and kaidesu committed Dec 23, 2019
1 parent 5990185 commit c17e3a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public function checkActiveStatus()
$path = ltrim(parse_url($this->url(), PHP_URL_PATH), '/');
$requestPath = Request::path();

if ($this->builder->config['rest_base']) {
if (isset($this->builder->config) && $this->builder->config['rest_base']) {
$base = (is_array($this->builder->config['rest_base'])) ? implode('|', $this->builder->config['rest_base']) : $this->builder->conf['rest_base'];

list($path, $requestPath) = preg_replace('@^('.$base.')/@', '', [$path, $requestPath], 1);
Expand Down
2 changes: 1 addition & 1 deletion src/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function loadConfig($name)
return array_merge($options['default'], $options[$name]);
}

return $options['default'];
return $options['default'] ?? null;
}

/**
Expand Down

0 comments on commit c17e3a9

Please sign in to comment.