Skip to content

Commit e18f920

Browse files
authored
Change implode param orders for PHP 8 & above
1 parent 12baaad commit e18f920

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/BaseRepository.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ public function addCriteria(QueryBuilder $queryBuilder, Composite $expr, array $
300300
if(count($builtArraySQL))
301301
{
302302
// Implode into full array
303-
$fullSQL = "(" . implode($builtArraySQL, ' AND ') . ")";
303+
if(phpversion() >= 8)
304+
$fullSQL = "(" . implode(' AND ', $builtArraySQL) . ")";
305+
else
306+
$fullSQL = "(" . implode($builtArraySQL, ' AND ') . ")";
304307

305308
// Add it
306309
$expr->add($fullSQL);

0 commit comments

Comments
 (0)