Generated with the help of an LLM.

Claude found this bug while upgrading a site to PHP 8.5

Problem/Motivation

On PHP 8.5, TaxonomyIndexTid::validateExposed() triggers a deprecation when the filter is grouped and the exposed input for its identifier is NULL

Deprecated function: Using null as an array offset is deprecated, use an empty string instead in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->validateExposed() (line 371 of core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php).

Steps to reproduce

1. On PHP 8.5, create a view with an exposed, grouped "Has taxonomy term" (taxonomy_index_tid) filter.
2. Submit the exposed form without a value for that filter, for example by submitting a different exposed filter through AJAX

Proposed resolution

Skip the grouped lookup when the input is NULL

Remaining tasks

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Issue fork drupal-3632283

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review