[BUGFIX] parseDynamicOperand appends to uninitialized variable
authorOliver Klee <typo3-coding@oliverklee.de>
Fri, 16 Mar 2012 21:34:52 +0000 (22:34 +0100)
committerFelix Oertel <typo3@foertel.com>
Sat, 17 Mar 2012 09:24:43 +0000 (10:24 +0100)
Tx_Extbase_Persistence_Storage_Typo3DbBackend::parseDynamicOperand
appends to uninitialized local variable $constraintSQL.

Change-Id: Ifbe15ad5ede46bdcac401e4ea45e4006f647955c
Releases: 4.7, 4.8
Fixes: #34921

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php

index badaebe..b852166 100644 (file)
@@ -658,6 +658,8 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
                        }
                        $columnName = $this->dataMapper->convertPropertyNameToColumnName($propertyName, $className);
                        $operator = $this->resolveOperator($operator);
+
+                       $constraintSQL = '';
                        if ($valueFunction === NULL) {
                                $constraintSQL .= (!empty($tableName) ? $tableName . '.' : '') . $columnName .  ' ' . $operator . ' ?';
                        } else {