- Issue created by @anthonytm
- Merge request !22Issue 3491491: Apply default values for array indexes that may not be defined in the view. → (Open) created by Unnamed author
For reasons I cannot explain, it appears that most of my views no longer presented default values for several fields being referenced in the ViewsEFFieldset.php file. This could be a result of a recent update to Core or PHP, but I cannot pinpoint when the issue began. I came across the issue when attempting to setup a new view. Several errors like this one appeared my console log when attempting to configure the exposed for style settings:
Warning: Undefined array key "options" in /var/www/html/docroot/modules/contrib/views_ef_fieldset/src/Plugin/views/display_extender/ViewsEFFieldset.php on line 194
Warning: Trying to access array offset on null in /var/www/html/docroot/modules/contrib/views_ef_fieldset/src/Plugin/views/display_extender/ViewsEFFieldset.php on line 194
These prevented the settings window from opening.
Adding some basic checks that provide a default value when the key missing seems to solve the problem.
Needs review
1.0
Code