Commit 4085e8e8 authored by Nigel McNie's avatar Nigel McNie
Browse files

Handle the case where we call ensure_record_exists with the same object as...

Handle the case where we call ensure_record_exists with the same object as $where and $data. update_record was getting teh angry.
parent e160065c
......@@ -1074,7 +1074,7 @@ function ensure_record_exists($table, $whereobject, $dataobject, $primarykey=fal
else {
$toreturn = true;
}
if ($dataobject) { // we want to update it)
if ($dataobject && $dataobject != $whereobject) { // we want to update it)
update_record($table, $dataobject, $whereobject);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment