Issue Bug Closed

#89816error in linkPage generation

david no-lastname-given 12/01/19, 14:18 updated 04/01/20, 21:14

Description

I get sometimes an error in searchcontroller in function linkPage.

first i get two warnings:
Core: Error handler (FE): PHP Warning: array_replace_recursive(): Argument #2 is not an array in /sysext/indexed_search/Classes/Controller/SearchController.php line 1335
Core: Error handler (FE): PHP Warning: array_merge(): Argument #1 is not an array in //sysext/indexed_search/Classes/Controller/SearchController.php line 1345

then an error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 3 passed to TYPO3\CMS\IndexedSearch\Controller\SearchController::preparePageLink() must be of the type array, null given, called in /sysext/indexed_search/Classes/Controller/SearchController.php on line 1352

In my project sometimes “null” is stored for “static_page_arguments” in the database. Most other records are stored with “”. I think this happens with option “Index Records immediately when saved?”

if ($row[‘static_page_arguments’] !== null —> is not working.
if ($row[‘static_page_arguments’] !== null && $row[‘static_page_arguments’] != ‘null’) { —> works for me

Reviews 2