Merge pull request #901 from franzliedke/patch-18
Ignore NULL values when determining whether a model object is dirty
This commit is contained in:
commit
e6ff7ba336
|
@ -538,7 +538,7 @@ public function get_dirty()
|
|||
|
||||
foreach ($this->attributes as $key => $value)
|
||||
{
|
||||
if ( ! isset($this->original[$key]) or $value !== $this->original[$key])
|
||||
if ( ! array_key_exists($key, $this->original) or $value !== $this->original[$key])
|
||||
{
|
||||
$dirty[$key] = $value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue