Skip to content

Commit

Permalink
MDL-18293 removed obsoleted checking of return values from insert and…
Browse files Browse the repository at this point in the history
… update_record
  • Loading branch information
skodak committed Jun 13, 2009
1 parent 44f27e4 commit b8ac7ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/file/file_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,7 @@ public function create_file_from_storedfile($file_record, $fid) {
$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);
}

Expand Down

0 comments on commit b8ac7ec

Please sign in to comment.