From 82dbd3b1e17126f70a14535f971435843ab11ca5 Mon Sep 17 00:00:00 2001 From: Markus Klein <klein.t3@mfc-linz.at> Date: Thu, 20 Feb 2014 10:36:45 +0100 Subject: [PATCH] [BUGFIX] DatabaseConnection::listQuery wrong usage of strpos() In DatabaseConnection::listQuery strpos() is used with wrong parameter order. Resolves: #56135 Releases: 6.2, 6.1, 6.0 Change-Id: Iaa18d46442a2aac21a836216cb61ae376bbb2090 Reviewed-on: https://review.typo3.org/27749 Reviewed-by: Stefan Neufeind Tested-by: Stefan Neufeind --- typo3/sysext/core/Classes/Database/DatabaseConnection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/core/Classes/Database/DatabaseConnection.php b/typo3/sysext/core/Classes/Database/DatabaseConnection.php index d36c4634bd71..4b6690f29db3 100644 --- a/typo3/sysext/core/Classes/Database/DatabaseConnection.php +++ b/typo3/sysext/core/Classes/Database/DatabaseConnection.php @@ -671,12 +671,12 @@ class DatabaseConnection { * @param string $field Field name * @param string $value Value to find in list * @param string $table Table in which we are searching (for DBAL detection of quoteStr() method) - * @throws \InvalidArgumentException * @return string WHERE clause for a query + * @throws \InvalidArgumentException */ public function listQuery($field, $value, $table) { - $value = (string) $value; - if (strpos(',', $value) !== FALSE) { + $value = (string)$value; + if (strpos($value, ',') !== FALSE) { throw new \InvalidArgumentException('$value must not contain a comma (,) in $this->listQuery() !', 1294585862); } $pattern = $this->quoteStr($value, $table); -- GitLab