Skip to content

Commit 1ec2f3b

Browse files
committed
Expand Query named binds recognition
1 parent b0cf1f3 commit 1ec2f3b

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/qvzPaZ/1
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)