File tree Expand file tree Collapse file tree
lib/private/DB/QueryBuilder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -582,6 +582,9 @@ private function addOutputColumns(array $columns): void {
582582 if (is_array ($ column )) {
583583 $ this ->addOutputColumns ($ column );
584584 } elseif (is_string ($ column ) && !str_contains ($ column , '* ' )) {
585+ if (str_contains (strtolower ($ column ), ' as ' )) {
586+ [, $ column ] = preg_split ('/ as /i ' , $ column );
587+ }
585588 if (str_contains ($ column , '. ' )) {
586589 [, $ column ] = explode ('. ' , $ column );
587590 }
@@ -591,14 +594,7 @@ private function addOutputColumns(array $columns): void {
591594 }
592595
593596 public function getOutputColumns (): array {
594- return array_unique (array_map (function (string $ column ) {
595- if (str_contains ($ column , '. ' )) {
596- [, $ column ] = explode ('. ' , $ column );
597- return $ column ;
598- } else {
599- return $ column ;
600- }
601- }, $ this ->selectedColumns ));
597+ return array_unique ($ this ->selectedColumns );
602598 }
603599
604600 /**
You can’t perform that action at this time.
0 commit comments