Skip to content

Commit

Permalink
fix: DB\SQL\Mapper: allow to pass an empty array as $filter, fixes bc…
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Sep 18, 2022
1 parent 481a88d commit 27d9279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/sql/mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function stringify($fields,$filter=NULL,array $options=NULL) {
if (isset($this->as))
$sql.=' AS '.$this->db->quotekey($this->as);
$args=[];
if (is_array($filter)) {
if (is_array($filter) && !empty($filter)) {
$args=isset($filter[1]) && is_array($filter[1])?
$filter[1]:
array_slice($filter,1,NULL,TRUE);
Expand Down

0 comments on commit 27d9279

Please sign in to comment.