Skip to content

Commit

Permalink
Fix strtolower() function deprecation issue andersao#782
Browse files Browse the repository at this point in the history
Fixing issue with the `strtolower()` function for PHP 8.1, where it is deprecated to receive `null` as a function parameter. Changed the default value of `$searchJoin` to empty string instead of `null`.
  • Loading branch information
franverfsm authored Mar 8, 2023
1 parent a9b4e72 commit c708367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Prettus/Repository/Criteria/RequestCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function apply($model, RepositoryInterface $repository)
$sortedBy = $this->request->get(config('repository.criteria.params.sortedBy', 'sortedBy'), 'asc');
$with = $this->request->get(config('repository.criteria.params.with', 'with'), null);
$withCount = $this->request->get(config('repository.criteria.params.withCount', 'withCount'), null);
$searchJoin = $this->request->get(config('repository.criteria.params.searchJoin', 'searchJoin'), null);
$searchJoin = $this->request->get(config('repository.criteria.params.searchJoin', 'searchJoin'), '');
$sortedBy = !empty($sortedBy) ? $sortedBy : 'asc';

if ($search && is_array($fieldsSearchable) && count($fieldsSearchable)) {
Expand Down Expand Up @@ -331,4 +331,4 @@ protected function parserFieldsSearch(array $fields = [], array $searchFields =

return $fields;
}
}
}

0 comments on commit c708367

Please sign in to comment.