Fixed bug #11980: TCEforms suggest defaultreceiver returns array or boolean (thanks...
authorRupert Germann <rupi@gmx.li>
Mon, 26 Oct 2009 13:45:35 +0000 (13:45 +0000)
committerRupert Germann <rupi@gmx.li>
Mon, 26 Oct 2009 13:45:35 +0000 (13:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6276 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/tceforms/class.t3lib_tceforms_suggest.php
t3lib/tceforms/class.t3lib_tceforms_suggest_defaultreceiver.php

index 6700751..75d02fe 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-26  Rupert Germann  <rupi@gmx.li>
+
+       * Fixed bug #11980: TCEforms suggest defaultreceiver returns array or boolean (thanks to Steffen Gebert)
+
 2009-10-25  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug RFC #12326: EXT:setup CSH mode setting gets lost (thanks to Steffen Gebert)
index 7ea58c1..6c320af 100644 (file)
@@ -183,7 +183,7 @@ class t3lib_TCEforms_Suggest {
                        $params = array('value' => $search);
                        $rows = $receiverObj->queryTable($params);
 
-                       if (!$rows) {
+                       if (empty($rows)) {
                                continue;
                        }
                        $resultRows = t3lib_div::array_merge($resultRows, $rows);
index cfb844f..fc459f3 100644 (file)
@@ -143,7 +143,7 @@ class t3lib_TCEforms_Suggest_DefaultReceiver {
         *
         * @param  array  $params
         * @param  object $ref  the parent object
-        * @return mixed  array of rows or false if nothing found
+        * @return array  array of rows
         */
        public function queryTable(&$params, $recursionCounter = 0) {
                $rows = array();
@@ -215,10 +215,8 @@ class t3lib_TCEforms_Suggest_DefaultReceiver {
                                $tmp = self::queryTable($params, ++$recursionCounter);
                                $rows = array_merge($tmp, $rows);
                        }
-                       return $rows;
-               } else {
-                       return false;
                }
+               return $rows;
        }
 
        /**