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()
368
368
$ layoutDirs = $ this ->getViewPaths ('layouts ' );
369
369
370
370
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
+ }
373
375
}
374
376
}
375
377
Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ protected function loadVendorViews(): void
38
38
$ vendorViewsPath = $ this ->getPath ('resources/views/vendor ' );
39
39
40
40
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
+ }
45
45
}
46
46
}
47
47
}
You can’t perform that action at this time.
0 commit comments