Skip to content

Commit

Permalink
Ignore removal for raw order (#20236)
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid authored and taylorotwell committed Jul 24, 2017
1 parent 03c7397 commit ded3279
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
}

/**
* Get an array orders with all orders for an given column removed.
* Get an array with all orders with a given column removed.
*
* @param string $column
* @return array
Expand All @@ -1571,7 +1571,8 @@ protected function removeExistingOrdersFor($column)
{
return Collection::make($this->orders)
->reject(function ($order) use ($column) {
return $order['column'] === $column;
return isset($order['column'])
? $order['column'] === $column : false;
})->values()->all();
}

Expand Down

0 comments on commit ded3279

Please sign in to comment.