Browse Source

The __get() magic method runs three checks before giving up but the __isset() method only runs two checks. This syncs the logic to ensure that __get() and __isset() are looking at the same possibilities.

Mark Huot 12 years ago
parent
commit
49384514ef
1 changed files with 2 additions and 0 deletions
  1. 2 0
      laravel/database/eloquent/model.php

+ 2 - 0
laravel/database/eloquent/model.php

@@ -650,6 +650,8 @@ abstract class Model {
 		{
 			if (array_key_exists($key, $this->$source)) return true;
 		}
+		
+		if (method_exists($this, $key)) return true;
 	}
 
 	/**