Skip to content

Commit a5fc431

Browse files
authored
Expand Query named binds recognition (#4769)
1 parent 3f3f5a0 commit a5fc431

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Database/Query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,13 @@ public function getOriginalQuery(): string
315315
*
316316
* @return void
317317
*
318-
* @see https://regex101.com/r/EUEhay/1 Test
318+
* @see https://regex101.com/r/EUEhay/4
319319
*/
320320
protected function compileBinds()
321321
{
322322
$sql = $this->finalQueryString;
323323

324-
$hasNamedBinds = preg_match('/:[a-z\d.)_(]+:/i', $sql) === 1;
324+
$hasNamedBinds = preg_match('/:((?!=).+):/', $sql) === 1;
325325

326326
if (empty($this->binds)
327327
|| empty($this->bindMarker)

0 commit comments

Comments
 (0)