Skip to content

Commit

Permalink
Merge pull request #3154 from mgralikowski/patch-2
Browse files Browse the repository at this point in the history
fix: ErrorException when direction is null
  • Loading branch information
yajra authored Jul 3, 2024
2 parents 74a1d06 + 14a1f1a commit b0f1177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utilities/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function orderableColumns(): array
/** @var string $direction */
$direction = $this->request->input("order.$i.dir");

$order_dir = strtolower($direction) === 'asc' ? 'asc' : 'desc';
$order_dir = $direction && strtolower($direction) === 'asc' ? 'asc' : 'desc';
if ($this->isColumnOrderable($order_col)) {
$orderable[] = ['column' => $order_col, 'direction' => $order_dir];
}
Expand Down

0 comments on commit b0f1177

Please sign in to comment.