File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,9 +124,9 @@ class BaseBuilder
124124 protected array $ QBUnion = [];
125125
126126 /**
127- * QB NO ESCAPE data
127+ * Whether to protect identifiers in SELECT
128128 *
129- * @var array
129+ * @var list<bool|null> true=protect, false=not protect
130130 */
131131 public $ QBNoEscape = [];
132132
@@ -391,6 +391,7 @@ public function ignore(bool $ignore = true)
391391 * Generates the SELECT portion of the query
392392 *
393393 * @param list<RawSql|string>|RawSql|string $select
394+ * @param bool|null $escape Whether to protect identifiers
394395 *
395396 * @return $this
396397 */
@@ -3066,8 +3067,8 @@ protected function compileSelect($selectOverride = false): string
30663067 // The reason we protect identifiers here rather than in the select() function
30673068 // is because until the user calls the from() function we don't know if there are aliases
30683069 foreach ($ this ->QBSelect as $ key => $ val ) {
3069- $ noEscape = $ this ->QBNoEscape [$ key ] ?? null ;
3070- $ this ->QBSelect [$ key ] = $ this ->db ->protectIdentifiers ($ val , false , $ noEscape );
3070+ $ protect = $ this ->QBNoEscape [$ key ] ?? null ;
3071+ $ this ->QBSelect [$ key ] = $ this ->db ->protectIdentifiers ($ val , false , $ protect );
30713072 }
30723073
30733074 $ sql .= implode (', ' , $ this ->QBSelect );
You can’t perform that action at this time.
0 commit comments