Commit 1847a369 authored by Taylor Otwell's avatar Taylor Otwell

fixed eloquent datetime bug when determining dirty attributes.

parent 8bc128fd
......@@ -472,7 +472,17 @@ abstract class Model {
*/
public function get_dirty()
{
return array_diff_assoc($this->attributes, $this->original);
$dirty = array();
foreach ($this->attributes as $key => $value)
{
if ( ! isset($this->original[$key]) or $value !== $this->original[$key])
{
$dirty[$key] = $value;
}
}
return $dirty;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment