Fixed incorrect escaping when using backslashes

This commit is contained in:
Tobias Reich 2016-03-13 21:19:10 +01:00
parent deeeaa56ea
commit 6db83d45e2

View File

@ -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);