File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,7 @@ public function ignore(bool $ignore = true)
390
390
/**
391
391
* Generates the SELECT portion of the query
392
392
*
393
- * @param array |RawSql|string $select
393
+ * @param list<RawSql|string> |RawSql|string $select
394
394
*
395
395
* @return $this
396
396
*/
@@ -402,16 +402,21 @@ public function select($select = '*', ?bool $escape = null)
402
402
}
403
403
404
404
if ($ select instanceof RawSql) {
405
- $ this ->QBSelect [] = $ select ;
406
-
407
- return $ this ;
405
+ $ select = [$ select ];
408
406
}
409
407
410
408
if (is_string ($ select )) {
411
- $ select = $ escape === false ? [$ select ] : explode (', ' , $ select );
409
+ $ select = ( $ escape === false ) ? [$ select ] : explode (', ' , $ select );
412
410
}
413
411
414
412
foreach ($ select as $ val ) {
413
+ if ($ val instanceof RawSql) {
414
+ $ this ->QBSelect [] = $ val ;
415
+ $ this ->QBNoEscape [] = false ;
416
+
417
+ continue ;
418
+ }
419
+
415
420
$ val = trim ($ val );
416
421
417
422
if ($ val !== '' ) {
You can’t perform that action at this time.
0 commit comments