From 3b692c4788f7be1d178216346f36e68f781a777d Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Fri, 19 Jan 2018 15:11:46 +0100 Subject: [PATCH] Remove the redundant regex check. --- system/modules/core/library/Contao/Database/Mysql.php | 5 +---- system/modules/core/library/Contao/Database/Mysqli.php | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/system/modules/core/library/Contao/Database/Mysql.php b/system/modules/core/library/Contao/Database/Mysql.php index 3231100435..c6ec78bb73 100644 --- a/system/modules/core/library/Contao/Database/Mysql.php +++ b/system/modules/core/library/Contao/Database/Mysql.php @@ -95,10 +95,7 @@ protected function get_error() */ protected function find_in_set($strKey, $varSet, $blnIsField=false) { - if (preg_match('/^[A-Za-z0-9_$]+$/', $strKey)) - { - $strKey = static::quoteIdentifier($strKey); - } + $strKey = static::quoteIdentifier($strKey); if ($blnIsField) { diff --git a/system/modules/core/library/Contao/Database/Mysqli.php b/system/modules/core/library/Contao/Database/Mysqli.php index 8728b0fce6..70ae38af4c 100644 --- a/system/modules/core/library/Contao/Database/Mysqli.php +++ b/system/modules/core/library/Contao/Database/Mysqli.php @@ -85,10 +85,7 @@ protected function get_error() */ protected function find_in_set($strKey, $varSet, $blnIsField=false) { - if (preg_match('/^[A-Za-z0-9_$]+$/', $strKey)) - { - $strKey = static::quoteIdentifier($strKey); - } + $strKey = static::quoteIdentifier($strKey); if ($blnIsField) {