summaryrefslogtreecommitdiff
path: root/modules/upload/upload.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upload/upload.module')
-rw-r--r--modules/upload/upload.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 76bc7b2b6..055e0cd91 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -281,7 +281,7 @@ function upload_file_load($files) {
*/
function upload_file_references($file) {
// If upload.module is still using a file, do not let other modules delete it.
- $file_used = (bool) db_query_range('SELECT 1 FROM {upload} WHERE fid = :fid', array(':fid' => $file->fid), 0, 1)->fetchField();
+ $file_used = (bool) db_query_range('SELECT 1 FROM {upload} WHERE fid = :fid', 0, 1, array(':fid' => $file->fid))->fetchField();
if ($file_used) {
// Return the name of the module and how many references it has to the file.
return array('upload' => $count);