mirror of
https://github.com/moodle/moodle.git
synced 2025-05-15 04:36:13 +02:00
MDL-18293 removed obsoleted checking of return values from insert and update_record
This commit is contained in:
parent
44f27e4123
commit
b8ac7ecec8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user