Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed incorrect comparison. Peter Paluch pointed this out.

  • Loading branch information...
commit 509139373e9ff56ac2e79fb72c8eac5d1b27cbb4 1 parent 78e72ed
authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/datalib.php
2  lib/datalib.php
@@ -545,7 +545,7 @@ function insert_record($table, $dataobject, $returnid=true) {
545 545
     foreach ($columns as $column) {
546 546
         if ($column->name <> "id") {
547 547
             if (isset($data[$column->name])) { 
548  
-                if ($data[$column->name] == "" and !empty($column->has_default) and !empty($column->default_value)) {
  548
+                if ((string)$data[$column->name] == "" and !empty($column->has_default) and !empty($column->default_value)) {
549 549
                     $ddd[$column->name] = $column->default_value;
550 550
                 } else {
551 551
                     $ddd[$column->name] = $data[$column->name];

0 notes on commit 5091393

Please sign in to comment.
Something went wrong with that request. Please try again.