Browse Source

tweak eloquent model change method to not check types.

Taylor Otwell 12 years ago
parent
commit
1879e6575a
2 changed files with 2 additions and 1 deletions
  1. 1 1
      laravel/database/eloquent/model.php
  2. 1 0
      laravel/documentation/changes.md

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

@@ -502,7 +502,7 @@ abstract class Model {
 	 */
 	 */
 	public function changed($attribute)
 	public function changed($attribute)
 	{
 	{
-		return array_get($this->attributes, $attribute) !== array_get($this->original, $attribute);
+		return array_get($this->attributes, $attribute) != array_get($this->original, $attribute);
 	}
 	}
 
 
 	/**
 	/**

+ 1 - 0
laravel/documentation/changes.md

@@ -37,6 +37,7 @@
 ## Laravel 3.2.4
 ## Laravel 3.2.4
 
 
 - Speed up many to many eager loading mapping.
 - Speed up many to many eager loading mapping.
+- Tweak the Eloquent::changed() method.
 
 
 <a name="upgrade-3.2.3"></a>
 <a name="upgrade-3.2.3"></a>
 ## Upgrading From 3.2.3
 ## Upgrading From 3.2.3