Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Check if dir exists before glob()
Browse files Browse the repository at this point in the history
I get an Invalid argument supplied for foreach() exception otherwise (on 1 system, other system works fine) (on develop this time)
  • Loading branch information
barryvdh committed Feb 12, 2014
1 parent ba5c6a6 commit 97ad1a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rocketeer/RocketeerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ protected function loadFileOrFolder(Container $app, $handle)
}

// Else include its contents
else {
elseif (is_dir($file)) {
$folder = glob($file.'/*.php');
foreach ($folder as $file) {
include $file;
Expand Down

0 comments on commit 97ad1a9

Please sign in to comment.