Project

General

Profile

Actions

Bug #21075

closed

TCEforms suggest defaultreceiver returns array or boolean

Added by Steffen Gebert about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-09-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

To fetch additional records, the following code is executed in queryTable():
$tmp = self::queryTable($params, ++$recursionCounter);
$rows = array_merge($tmp, $rows);

Unfortunately queryTable() returns false, if no records are found and so array_merge() fails.

This happens (I think), if exactly a multiple of 50 possible results exist and so queryTable() is called again, to fetch more records (as $allRowsCount >= 50 is checked (and not > 50, but this has to stay I think)).

So instead of returning FALSE, better return an empty array().

[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in /Applications/MAMP/htdocs/vhosts/fw/typo3_src/t3lib/tceforms/class.t3lib_tceforms_suggest_defaultreceiver.php on line 220, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP Stack trace:, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP 1. {main}() /Applications/MAMP/htdocs/vhosts/fw/typo3_src/typo3/ajax.php:0, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP 2. t3lib_div::callUserFunction() /Applications/MAMP/htdocs/vhosts/fw/typo3_src/typo3/ajax.php:72, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP 3. call_user_func_array() /Applications/MAMP/htdocs/vhosts/fw/typo3_src/t3lib/class.t3lib_div.php:4813, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP 4. t3lib_TCEforms_Suggest->processAjaxRequest() /Applications/MAMP/htdocs/vhosts/fw/typo3_src/t3lib/class.t3lib_div.php:0, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP 5. t3lib_TCEforms_Suggest_DefaultReceiver->queryTable() /Applications/MAMP/htdocs/vhosts/fw/typo3_src/t3lib/tceforms/class.t3lib_tceforms_suggest.php:181, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
[Wed Sep 16 18:26:29 2009] [error] [client ::1] PHP 6. array_merge() /Applications/MAMP/htdocs/vhosts/fw/typo3_src/t3lib/tceforms/class.t3lib_tceforms_suggest_defaultreceiver.php:220, referer: http://localhost/typo3/alt_doc.php?edit[pages]5407=edit&returnUrl=http%3A%2F%2Flocalhost%2Ftypo3%2Fsysext%2Fcms%2Flayout%2Fdb_layout.php
(issue imported from #M11980)


Files

11980.diff (1.26 KB) 11980.diff Administrator Admin, 2009-09-16 21:25
11980_v3.diff (1.26 KB) 11980_v3.diff Administrator Admin, 2009-10-26 14:47
Actions #1

Updated by Rupert Germann about 15 years ago

FYI: committed v3 to trunk rev 6276

Actions

Also available in: Atom PDF