INNER keyword could wrongly be parsed as table alias in INNER JOIN
authorXavier Perseguers <typo3@perseguers.ch>
Fri, 6 Nov 2009 17:15:56 +0000 (17:15 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Fri, 6 Nov 2009 17:15:56 +0000 (17:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@26264 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/class.ux_t3lib_sqlparser.php

index efbe20d..d5db019 100644 (file)
@@ -76,7 +76,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                        $this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"), '', $this->lastStopKeyWord));
                                        return $stack;
                                }
-                               if (!preg_match('/^(LEFT|JOIN)[[:space:]]+/i',$parseString)) {
+                               if (!preg_match('/^(LEFT|JOIN|INNER)[[:space:]]+/i', $parseString)) {
                                        $stack[$pnt]['as_keyword'] = $this->nextPart($parseString,'^(AS[[:space:]]+)');
                                        $stack[$pnt]['as'] = $this->nextPart($parseString,'^([[:alnum:]_]+)[[:space:]]*');
                                }