Commit 05e21b72 by Qiang Xue

Fixes #4135

parent 1c3c232f
...@@ -716,7 +716,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface ...@@ -716,7 +716,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
$changedAttributes = []; $changedAttributes = [];
foreach ($values as $name => $value) { foreach ($values as $name => $value) {
$changedAttributes[$name] = $this->_oldAttributes[$name]; $changedAttributes[$name] = isset($this->_oldAttributes[$name]) ? $this->_oldAttributes[$name] : null;
$this->_oldAttributes[$name] = $value; $this->_oldAttributes[$name] = $value;
} }
$this->afterSave(false, $changedAttributes); $this->afterSave(false, $changedAttributes);
......
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