Merge pull request #1855 from rittme/patch-1
get_dirty() comparison is not type safe
This commit is contained in:
@@ -517,7 +517,7 @@ abstract class Model {
|
|||||||
|
|
||||||
foreach ($this->attributes as $key => $value)
|
foreach ($this->attributes as $key => $value)
|
||||||
{
|
{
|
||||||
if ( ! array_key_exists($key, $this->original) or $value != $this->original[$key])
|
if ( ! array_key_exists($key, $this->original) or $value !== $this->original[$key])
|
||||||
{
|
{
|
||||||
$dirty[$key] = $value;
|
$dirty[$key] = $value;
|
||||||
}
|
}
|
||||||
@@ -795,4 +795,4 @@ abstract class Model {
|
|||||||
return call_user_func_array(array(new $model, $method), $parameters);
|
return call_user_func_array(array(new $model, $method), $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user