From: skodak Date: Sat, 13 Jun 2009 16:47:05 +0000 (+0000) Subject: MDL-18293 removed obsoleted checking of return values from insert and update_record X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b8ac7ecec8145a01f2b37b233bec300acf286efc;p=moodle.git MDL-18293 removed obsoleted checking of return values from insert and update_record --- diff --git a/lib/file/file_storage.php b/lib/file/file_storage.php index 4ca660b913..280bca42b7 100644 --- a/lib/file/file_storage.php +++ b/lib/file/file_storage.php @@ -473,10 +473,7 @@ class file_storage { $directory = $this->create_directory($newrecord->contextid, $newrecord->filearea, $newrecord->itemid, $newrecord->filepath, $newrecord->userid); // update the existing directory with the new data $newrecord->id = $directory->get_id(); - if (!$DB->update_record('files', $newrecord)) { - throw new stored_file_creation_exception($newrecord->contextid, $newrecord->filearea, $newrecord->itemid, - $newrecord->filepath, $newrecord->filename); - } + $DB->update_record('files', $newrecord); return new stored_file($this, $newrecord); }