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)
390390 /**
391391 * Generates the SELECT portion of the query
392392 *
393- * @param array |RawSql|string $select
393+ * @param list<RawSql|string> |RawSql|string $select
394394 *
395395 * @return $this
396396 */
@@ -402,16 +402,21 @@ public function select($select = '*', ?bool $escape = null)
402402 }
403403
404404 if ($ select instanceof RawSql) {
405- $ this ->QBSelect [] = $ select ;
406-
407- return $ this ;
405+ $ select = [$ select ];
408406 }
409407
410408 if (is_string ($ select )) {
411- $ select = $ escape === false ? [$ select ] : explode (', ' , $ select );
409+ $ select = ( $ escape === false ) ? [$ select ] : explode (', ' , $ select );
412410 }
413411
414412 foreach ($ select as $ val ) {
413+ if ($ val instanceof RawSql) {
414+ $ this ->QBSelect [] = $ val ;
415+ $ this ->QBNoEscape [] = false ;
416+
417+ continue ;
418+ }
419+
415420 $ val = trim ($ val );
416421
417422 if ($ val !== '' ) {
You can’t perform that action at this time.
0 commit comments