From 6db83d45e21bd9746542331e8405762bd3e0a866 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 13 Mar 2016 21:19:10 +0100 Subject: [PATCH] Fixed incorrect escaping when using backslashes --- php/Modules/Database.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/Modules/Database.php b/php/Modules/Database.php index 60ee093..0948249 100755 --- a/php/Modules/Database.php +++ b/php/Modules/Database.php @@ -356,6 +356,10 @@ final class Database { } + // Put a backslash in front of every character that is part of the regular + // expression syntax. Avoids a backreference when using preg_replace. + $value = preg_quote($value); + // Replace $query = preg_replace('/\?/', $value, $query, 1);