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.
Comments
Comment #3
acbramley commentedComment #4
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #5
acbramley commented