Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
It was my first time cherry picking commits and just
saw that i've made #baefe52 my own, which is not, sorry!
  • Loading branch information
Javdu10 committed Jun 11, 2021
1 parent 93f43e0 commit 6cd11b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,11 @@ public function orderBy($column, $direction = 'asc')
if (is_array($this->{$ordersProperty})) {
foreach ($this->{$ordersProperty} as $key => $value) {
if (isset($value['column']) && $value['column'] === $column) {
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 6);

if($trace[5]['function'] === 'callScope')
return $this;

$this->{$ordersProperty}[$key]['direction'] = $direction;

return $this;
Expand Down

0 comments on commit 6cd11b8

Please sign in to comment.