Permalink
Browse files

Better error checking in update_record

  • Loading branch information...
1 parent 673de29 commit 1afd014ea273f4c1f977202dc842ab33615baf8e martin committed Jul 27, 2002
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/moodlelib.php
View
@@ -687,7 +687,9 @@ function update_record($table, $dataobject) {
}
// Determine all the fields in the table
- $columns = $db->MetaColumns($table);
+ if (!$columns = $db->MetaColumns($table)) {
+ return false;
+ }
$data = (array)$dataobject;
// Pull out data matching these fields

0 comments on commit 1afd014

Please sign in to comment.