Issue Bug Closed

#96796Wrong addition to title in SearchController

Gerhard Rupp 02/08/22, 19:11 updated 10/04/22, 14:17

Description

Line 477 ff.

        if ($this->multiplePagesType($row['item_type'])) {
            $dat = json_decode($row['static_page_arguments'], true);
            $pp = explode('-', $dat['key']);
            if ($pp[0] != $pp[1]) {
                $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.page', 'IndexedSearch') . ' ' . $dat['key'];
            } else {
                $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.pages', 'IndexedSearch') . ' ' . $pp[0];
            }
        }

The else block should only be executed if static_page_arguments is not empty as the addition to the title makes no sense without any additional (page) information.

Reviews 3