Fixes for bad sort query filter
This commit is contained in:
parent
f00134cbfb
commit
eb2123bf4e
1 changed files with 4 additions and 0 deletions
|
|
@ -148,6 +148,10 @@ class InvoiceFilters extends QueryFilters
|
|||
{
|
||||
$sort_col = explode('|', $sort);
|
||||
|
||||
//catch invalid explode array count
|
||||
if(count($sort_col) == 1)
|
||||
return $this->builder;
|
||||
|
||||
return $this->builder->orderBy($sort_col[0], $sort_col[1]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue