Fixed bug with commit() when no original record is set (in the case that you are running an update but did not pull the row beforehand).
This commit is contained in:
parent
ccf728605d
commit
2ea8e1957d
1 changed files with 1 additions and 1 deletions
|
@ -870,7 +870,7 @@ class Model extends Object
|
|||
$input_parameters = null;
|
||||
|
||||
// Limits the columns being updated
|
||||
$record = ($update === true ? array_diff_assoc($this->record, $this->original[$this->index]) : $this->record);
|
||||
$record = ($update === true ? array_diff_assoc($this->record, isset($this->original[$this->index]) ? $this->original[$this->index] : array()) : $this->record);
|
||||
|
||||
// Makes sure there's something to INSERT or UPDATE
|
||||
if (count($record) > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue