]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15990 - fixing bug in file_storage::create_file_from_storedfile - missing !
authormjollnir_ <mjollnir_>
Sat, 9 Aug 2008 13:33:20 +0000 (13:33 +0000)
committermjollnir_ <mjollnir_>
Sat, 9 Aug 2008 13:33:20 +0000 (13:33 +0000)
lib/file/file_storage.php

index 38093c9659f2ebb5a0c7e77b92a1e309a0a8cafa..353bf39f567490ebd758b5ac5152dc3dfe830fb4 100644 (file)
@@ -360,7 +360,7 @@ class file_storage {
 
         $now = time();
 
-        if ($newrecord = $DB->get_record('files', array('id'=>$fid))) {
+        if (!$newrecord = $DB->get_record('files', array('id'=>$fid))) {
             throw new file_exception('storedfileproblem', 'File does not exist');
         }