diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/file.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/file.inc b/includes/file.inc index d73266cb4..451778ca5 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -494,6 +494,11 @@ function file_check_location($source, $directory = '') { * @see file_load() */ function file_load_multiple($fids = array(), $conditions = array()) { + // If they don't provide any criteria return nothing rather than all files. + if (!$fids && !$conditions) { + return array(); + } + $query = db_select('files', 'f')->fields('f'); // If the $fids array is populated, add those to the query. |