Skip to content

Commit

Permalink
[5.8] PHP 7.4 support for ServiceProvider (#30820)
Browse files Browse the repository at this point in the history
* fix ErrorException: Trying to access array offset on value of type null

* Update ServiceProvider.php
  • Loading branch information
rolandsusans authored and taylorotwell committed Dec 12, 2019
1 parent 58d5f78 commit 15d7f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Support/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function loadRoutesFrom($path)
*/
protected function loadViewsFrom($path, $namespace)
{
if (is_array($this->app->config['view']['paths'])) {
if (isset($this->app->config['view']['paths']) && is_array($this->app->config['view']['paths'])) {
foreach ($this->app->config['view']['paths'] as $viewPath) {
if (is_dir($appPath = $viewPath.'/vendor/'.$namespace)) {
$this->app['view']->addNamespace($namespace, $appPath);
Expand Down

0 comments on commit 15d7f97

Please sign in to comment.