Preprocessor pager hook missing checks for empty items

Created on 16 January 2024, 5 months ago
Updated 14 June 2024, 11 days ago

Problem/Motivation

Using pager on a search page. Getting a hard error when no results are returned. Error states that $items can't be null

TypeError: Drupal\ui_patterns_settings\Plugin\UiPatterns\SettingType\LinksSettingType::normalize(): Argument #1 ($items) must be of type array, null given, called in /var/www/html/idrc_dev/web/themes/contrib/ui_suite_bootstrap/ui_suite_bootstrap.theme on line 48 in Drupal\ui_patterns_settings\Plugin\UiPatterns\SettingType\LinksSettingType::normalize() (line 28 of /var/www/html/idrc_dev/web/modules/contrib/ui_patterns_settings/src/Plugin/UiPatterns/SettingType/LinksSettingType.php).

Steps to reproduce

Pager used on a search result page. If no results are returned from filter it causes the page to fail.

Proposed resolution

Use !isset and return checks in ui_suite_bootstrap_preprocess_pager function.

Remaining tasks

Patch in checks

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024