File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -368,8 +368,10 @@ public function listLayouts()
368368 $ layoutDirs = $ this ->getViewPaths ('layouts ' );
369369
370370 foreach ($ layoutDirs as $ layoutDir ) {
371- foreach (glob ($ layoutDir . '/{**/*,*}.php ' , GLOB_BRACE ) as $ layout ) {
372- $ layouts ->put ($ layout , basename ($ layout , '.blade.php ' ));
371+ if ($ layoutFiles = glob ($ layoutDir . '/{**/*,*}.php ' , GLOB_BRACE )) {
372+ foreach ($ layoutFiles as $ layout ) {
373+ $ layouts ->put ($ layout , basename ($ layout , '.blade.php ' ));
374+ }
373375 }
374376 }
375377
Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ protected function loadVendorViews(): void
3838 $ vendorViewsPath = $ this ->getPath ('resources/views/vendor ' );
3939
4040 if (file_exists ($ vendorViewsPath )) {
41- $ directories = glob ($ vendorViewsPath . '/* ' , GLOB_ONLYDIR );
42-
43- foreach ( $ directories as $ path ) {
44- View:: prependNamespace ( basename ( $ path ), $ path );
41+ if ( $ directories = glob ($ vendorViewsPath . '/* ' , GLOB_ONLYDIR )) {
42+ foreach ( $ directories as $ path ) {
43+ View:: prependNamespace ( basename ( $ path ), $ path );
44+ }
4545 }
4646 }
4747 }
You can’t perform that action at this time.
0 commit comments