]> git.mjollnir.org Git - moodle.git/commitdiff
Better error checking in update_record
authormartin <martin>
Sat, 27 Jul 2002 06:10:37 +0000 (06:10 +0000)
committermartin <martin>
Sat, 27 Jul 2002 06:10:37 +0000 (06:10 +0000)
lib/moodlelib.php

index a54d44370ce177910588392c0df0a5eacfa7937e..4fddc405f5dcece5729218b33bd788b2572726cb 100644 (file)
@@ -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