Filter rewrite never gets applied to values like 0 considered empty by PHP

Created on 13 December 2024, 2 months ago

Problem/Motivation

I was using the rewrite filter options setting to change the labels for a boolean field. 1|Yes was rewriting TRUE to Yes, but 0|No was not matching and output FALSE as the label instead. In searching the issue queue, I found this closed issue reported for the Drupal 7 version of the module:

https://www.drupal.org/project/better_exposed_filters/issues/2391843 β†’

Proposed resolution

On line 51 of web/modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php, I found !empty and changed it to isset as suggested in the issue linked to above. Now my views exposed filter shows Yes and No instead of Yes and FALSE.

I hope this helps. Let me know if more information is needed or if I can help in any other way.

πŸ› Bug report
Status

Active

Version

7.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States thoogend

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024