Skip to content

Commit 1728a88

Browse files
committed
update method signature and use force fill
1 parent a3e1acc commit 1728a88

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/Illuminate/Database/Eloquent/Model.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ protected function incrementOrDecrement($column, $amount, $extra, $method)
410410
return $query->{$method}($column, $amount, $extra);
411411
}
412412

413-
$this->incrementOrDecrementAttributeValue($column, $amount, $method, $extra);
413+
$this->incrementOrDecrementAttributeValue($column, $amount, $extra, $method);
414414

415415
return $query->where(
416416
$this->getKeyName(), $this->getKey()
@@ -422,13 +422,15 @@ protected function incrementOrDecrement($column, $amount, $extra, $method)
422422
*
423423
* @param string $column
424424
* @param int $amount
425+
* @param array $extra
425426
* @param string $method
426427
* @return void
427428
*/
428-
protected function incrementOrDecrementAttributeValue($column, $amount, $method, $extra = [])
429+
protected function incrementOrDecrementAttributeValue($column, $amount, $extra, $method)
429430
{
430431
$this->{$column} = $this->{$column} + ($method == 'increment' ? $amount : $amount * -1);
431-
$this->fill($extra);
432+
433+
$this->forceFill($extra);
432434

433435
$this->syncOriginalAttribute($column);
434436
}

0 commit comments

Comments
 (0)