In Filesystem.php in line:
glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) returns on my local system false, beacuse glob() returns error without information.
But if first i will check if glob() returns array, then everything works perfect. Maybe before iterating over glob() result, first we should check what it returns ?
Example
if (strpos($pattern, '**') !== FALSE) {
$path = glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT);
if (is_array($path)) {
foreach ($path as $dir) {
$files = array_merge($files, $this->recursiveGlob($dir.'/'.basename($pattern), $flags));
}
}
}
In Filesystem.php in line:
glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT)
returns on my local systemfalse
, beacuseglob()
returns error without information.I have no clue why it happens ( short discussion: http://stackoverflow.com/questions/13809465/why-does-glob-returns-false-when-the-directory-is-empty )
But if first i will check if
glob()
returns array, then everything works perfect. Maybe before iterating over glob() result, first we should check what it returns ?Example