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.
I just ran into an issue where I wasn't passing in an array to variable_get_value(), I was passing in a default value (like variable_get()), and the variable module was throwing errors and white screening. It took me awhile to figure out my issue, but once I did it worked great. After looking at your code I realized that if you were to add an array check like this:
function _variable_options(array $options = array()) {
That would throw an error sooner, and be much easier to find the problem for any future developers.
Comment | File | Size | Author |
---|---|---|---|
#2 | checkarray-2675628-1.patch | 554 bytes | mdfleury |
Comments
Comment #2
mdfleury CreditAttribution: mdfleury commented