Skip to content

Commit

Permalink
fix sortBy bug
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 30, 2020
1 parent f143d05 commit 307f6fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ public function sortDesc($options = SORT_REGULAR)
*/
public function sortBy($callback, $options = SORT_REGULAR, $descending = false)
{
if (is_array($callback)) {
if (is_array($callback) && ! is_callable($callback)) {
return $this->sortByMany($callback);
}

Expand Down

0 comments on commit 307f6fb

Please sign in to comment.