--- upload_replace.module.before 2012-09-10 10:12:21.000000000 -0500 +++ upload_replace.module 2012-09-20 08:23:08.000000000 -0500 @@ -17,7 +17,7 @@ * Implementation of hook_file_update() */ function upload_replace_file_update(&$new_file) { - if (!$new_file->fid) { + if (empty($new_file->fid)) { //Nothing to do if no fileid return; } @@ -146,6 +146,6 @@ * HOOK_file_delete, update the filepath in the file object before deleting as we may have altered it above * @param object $new_file */ -function upload_replace_file_delete(&$file) { +function upload_replace_file_delete($file) { $file->filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $file->fid)); }