Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed incorrect comparison. Peter Paluch pointed this out.

  • Loading branch information...
commit 509139373e9ff56ac2e79fb72c8eac5d1b27cbb4 1 parent 78e72ed
paca70 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/datalib.php
View
2  lib/datalib.php
@@ -545,7 +545,7 @@ function insert_record($table, $dataobject, $returnid=true) {
foreach ($columns as $column) {
if ($column->name <> "id") {
if (isset($data[$column->name])) {
- if ($data[$column->name] == "" and !empty($column->has_default) and !empty($column->default_value)) {
+ if ((string)$data[$column->name] == "" and !empty($column->has_default) and !empty($column->default_value)) {
$ddd[$column->name] = $column->default_value;
} else {
$ddd[$column->name] = $data[$column->name];

0 comments on commit 5091393

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