Skip to content

Commit

Permalink
Fixed error where getting a subset would cuase an error in is_changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Aug 3, 2011
1 parent 47194bc commit ac15e3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ public function is_changed($property = null)
$property = (array) $property ?: array_keys(static::properties());
foreach ($property as $p)
{
if ($this->{$p} !== $this->_original[$p])
if ( ! isset($this->_original[$p]) or $this->{$p} !== $this->_original[$p])
{
return true;
}
Expand Down

0 comments on commit ac15e3c

Please sign in to comment.