Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The comparison in cshs_form_select_options does not handle integer and string values very well. Because "a string" == 0 is always true.
Proposed resolution
Cast both values to a string. form_select_options does similar things, maybe we should backport some of the changes from form_select_options to cshs_form_select_options.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 2852474-1.patch | 685 bytes | webflo |
Comments
Comment #2
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #3
stefan.r CreditAttribution: stefan.r commentedAs form_select_options does the same this fix seems OK
Comment #5
stefan.r CreditAttribution: stefan.r commented