Skip to content

Commit 0f7f31a

Browse files
committed
chore(query): utilize Helper::flatten for array string conversion
- Updated `group` and `order` key handling to use `Helper::flatten` for improved array-to-string conversion logic.
1 parent f76dabd commit 0f7f31a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Mvc/Controller/Traits/Query.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use PhalconKit\Mvc\Controller\Traits\Query\Save;
3737
use PhalconKit\Mvc\Controller\Traits\Query\With;
3838
use PhalconKit\Mvc\Model\Interfaces\EagerLoadInterface;
39+
use PhalconKit\Support\Helper;
3940

4041
/**
4142
* Class Query
@@ -210,7 +211,7 @@ public function prepareFind(?Collection $find = null, bool $ignoreKey = false):
210211

211212
foreach (['group', 'order'] as $keyToJoin) {
212213
if (isset($build[$keyToJoin]) && is_array($build[$keyToJoin])) {
213-
$build[$keyToJoin] = implode(', ', $build[$keyToJoin]);
214+
$build[$keyToJoin] = implode(', ', Helper::flatten($build[$keyToJoin]));
214215
}
215216
}
216217

0 commit comments

Comments
 (0)