From 1afd014ea273f4c1f977202dc842ab33615baf8e Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 27 Jul 2002 06:10:37 +0000 Subject: [PATCH] Better error checking in update_record --- lib/moodlelib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index a54d44370c..4fddc405f5 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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 -- 2.39.5