]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed tiny buglet on insert_record which made it ignore NULL values
authormartin <martin>
Thu, 8 Aug 2002 12:41:21 +0000 (12:41 +0000)
committermartin <martin>
Thu, 8 Aug 2002 12:41:21 +0000 (12:41 +0000)
lib/moodlelib.php

index 5008942406c0e95c917106e813636d66e910b946..3000121e04b2e44394a9b98d68ab0562b7297d99 100644 (file)
@@ -730,7 +730,7 @@ function insert_record($table, $dataobject) {
 
     // Pull out data matching these fields
     foreach ($columns as $column) {
-        if ($column->name <> "id" && $data[$column->name] ) {
+        if ($column->name <> "id" && isset($data[$column->name]) ) {
             $ddd[$column->name] = $data[$column->name];
         }
     }