Ignore NULL values when determining whether a model object is dirty.

This commit is contained in:
Franz Liedke 2012-07-04 21:44:11 +03:00
parent 3ba5c00e5f
commit f2ccc688fe
1 changed files with 1 additions and 1 deletions

View File

@ -536,7 +536,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;
}