MDL-20309 improved sanitization of id property

This commit is contained in:
skodak
2009-09-26 11:55:57 +00:00
parent 1a7f4d16c5
commit 6c00930560
+3 -1
View File
@@ -1627,9 +1627,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)) {