Fixed bug #13490: Where clause 0=0 cannot be parsed
authorXavier Perseguers <typo3@perseguers.ch>
Tue, 9 Feb 2010 21:31:13 +0000 (21:31 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 9 Feb 2010 21:31:13 +0000 (21:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6889 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_sqlparser.php

index 4418444..9928a3b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-09  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #13490: Where clause 0=0 cannot be parsed
+
 2010-02-08  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Fixed bug #13464: ORA-00920: invalid relational operator in module statistics [indexed_search]
 2010-02-08  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Fixed bug #13464: ORA-00920: invalid relational operator in module statistics [indexed_search]
index 060783a..6950523 100644 (file)
@@ -1041,10 +1041,10 @@ class t3lib_sqlparser {
                                                        // - "/" (division)
                                                        // - "%" (modulo)
                                                $calcOperators = '&|\+|-|\*|\/|%';
                                                        // - "/" (division)
                                                        // - "%" (modulo)
                                                $calcOperators = '&|\+|-|\*|\/|%';
-               
+
                                                        // Fieldname:
                                                        // Fieldname:
-                                               if ($fieldName = $this->nextPart($parseString, '^([[:alnum:]._]+)([[:space:]]+|' . $calcOperators . '|<=|>=|<|>|=|!=|IS)')) {
-               
+                                               if (($fieldName = $this->nextPart($parseString, '^([[:alnum:]._]+)([[:space:]]+|' . $calcOperators . '|<=|>=|<|>|=|!=|IS)')) !== '') {
+
                                                                // Parse field name into field and table:
                                                        $tableField = explode('.', $fieldName, 2);
                                                        if (count($tableField) == 2) {
                                                                // Parse field name into field and table:
                                                        $tableField = explode('.', $fieldName, 2);
                                                        if (count($tableField) == 2) {