Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Remove the redundant regex check.
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Jan 19, 2018
1 parent 57803a5 commit 3b692c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions system/modules/core/library/Contao/Database/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
5 changes: 1 addition & 4 deletions system/modules/core/library/Contao/Database/Mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 3b692c4

Please sign in to comment.