Commit e6ff7ba3 by Taylor Otwell

Merge pull request #901 from franzliedke/patch-18

Ignore NULL values when determining whether a model object is dirty
parents a9d27ba7 f2ccc688
...@@ -538,7 +538,7 @@ abstract class Model { ...@@ -538,7 +538,7 @@ abstract class Model {
foreach ($this->attributes as $key => $value) 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; $dirty[$key] = $value;
} }
......
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