Permalink
Browse files

Prevent glob() from including folders

  • Loading branch information...
1 parent d1d41f5 commit 3bacfb8afee68c4453c8a7d1b4ebb881adf2f5ae @canton7 committed Aug 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 classes/casset.php
View
@@ -956,7 +956,7 @@ protected static function find_files($file, $asset_type)
}
else
{
- $glob_files = glob($path.$folder.$file);
+ $glob_files = array_filter(glob($path.$folder.$file), 'is_file');
if (!$glob_files || !count($glob_files))
throw new Casset_Exception("Found no files matching $path$folder$file");
return $glob_files;

0 comments on commit 3bacfb8

Please sign in to comment.