Skip to content

Commit

Permalink
Fixes for payment filters
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Feb 24, 2024
1 parent 9ecf49f commit b38ddff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Filters/PaymentFilters.php
Expand Up @@ -164,7 +164,7 @@ public function sort(string $sort = ''): Builder
{
$sort_col = explode('|', $sort);

if (!is_array($sort_col) || count($sort_col) != 2 || !in_array($sort_col, Schema::getColumnListing('payments'))) {
if (!is_array($sort_col) || count($sort_col) != 2 || !in_array($sort_col[0], Schema::getColumnListing('payments'))) {
return $this->builder;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Filters/UserFilters.php
Expand Up @@ -50,7 +50,7 @@ public function sort(string $sort = ''): Builder
{
$sort_col = explode('|', $sort);

if (!is_array($sort_col) || count($sort_col) != 2 || !in_array($sort_col, \Illuminate\Support\Facades\Schema::getColumnListing('users'))) {
if (!is_array($sort_col) || count($sort_col) != 2 || !in_array($sort_col[0], \Illuminate\Support\Facades\Schema::getColumnListing('users'))) {
return $this->builder;
}

Expand Down

0 comments on commit b38ddff

Please sign in to comment.