Skip to content

Commit afbf28d

Browse files
committed
Changing default value of isDirty to empty array so hasChanges works properly
See laravel/framework#20130 for what was changed in Laravel 5.5. We now need to use an empty array instead of null since the method hasChanges() in Illuminate\Database\Eloquent\Concerns\HasAttributes is checking for an empty array instead of null.
1 parent 72be946 commit afbf28d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Hookable.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ public function save(array $options = [])
139139
/**
140140
* Register hook for isDirty.
141141
*
142-
* @param null $attributes
142+
* @param array $attributes
143143
* @return bool
144144
*/
145-
public function isDirty($attributes = null)
145+
public function isDirty($attributes = [])
146146
{
147147
if (! is_array($attributes) && !is_null($attributes)) {
148148
$attributes = func_get_args();

0 commit comments

Comments
 (0)