diff --git a/lib/dmllib.php b/lib/dmllib.php index 552a0d09cd5..c35190a7c75 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -1498,9 +1498,11 @@ function update_record($table, $dataobject) { global $db, $CFG; - if (! isset($dataobject->id) ) { + // integer value in id propery required + if (empty($dataobject->id)) { return false; } + $dataobject->id = (int)$dataobject->id; /// Check we are handling a proper $dataobject if (is_array($dataobject)) {