Browse Source

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

Franz Liedke 12 years ago
parent
commit
f2ccc688fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/database/eloquent/model.php

+ 1 - 1
laravel/database/eloquent/model.php

@@ -536,7 +536,7 @@ abstract class Model {
 
 		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;
 			}