mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Fixed incorrect comparison. Peter Paluch pointed this out.
This commit is contained in:
parent
78e72ed16b
commit
509139373e
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user