#1695658: Support optgroups for taxonomy selection list introduced a bug that causes the following PHP Notices and Warnings:

    Notice: Undefined variable: options in views_handler_filter_term_node_tid->value_form() (line 237 of /var/www/html/sites/all/modules/git/views/modules/taxonomy/views_handler_filter_term_node_tid.inc).
    Notice: Undefined variable: options in views_handler_filter_term_node_tid->value_form() (line 238 of /var/www/html/sites/all/modules/git/views/modules/taxonomy/views_handler_filter_term_node_tid.inc).
    Warning: Invalid argument supplied for foreach() in views_handler_filter->prepare_filter_select_options() (line 1208 of /var/www/html/sites/all/modules/git/views/handlers/views_handler_filter.inc).
    Warning: Invalid argument supplied for foreach() in form_select_options() (line 2841 of /var/www/html/includes/form.inc).

It appears that a single line was accidentally removed from modules/taxonomy/views_handler_filter_term_node_tid.inc which initialized the $options variable.

See my comment here: https://www.drupal.org/project/views/issues/1695658#comment-13170199

CommentFileSizeAuthor
#2 views-3065777-2.patch695 bytesm.stenta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Attached is a patch that restores the declaration of the $options variable.

philipsoares’s picture

It's worked fine for me. Thanks.

renatog’s picture

Status: Active » Reviewed & tested by the community

Really makes sense

#RTBC

Good catch guys. Thank you so much!

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

renatog’s picture

Great!

Thank you all, guys!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.