Skip to content

Commit

Permalink
Expand Query named binds recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jun 3, 2021
1 parent b0cf1f3 commit 1ec2f3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Database/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ public function getOriginalQuery(): string
*
* @return void
*
* @see https://regex101.com/r/EUEhay/1 Test
* @see https://regex101.com/r/qvzPaZ/1
*/
protected function compileBinds()
{
$sql = $this->finalQueryString;

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

if (empty($this->binds)
|| empty($this->bindMarker)
Expand Down

0 comments on commit 1ec2f3b

Please sign in to comment.