When both arguments of includes/handler.incs/views_break_phrase are empty, all three ifs are skipped, and the foreach loop throws a warning. Settings of the view argument handler when this came up: term id, provide default, php code (which in theory should not have returned an empty string, but havent tested it rigorously), validator: taxonomy for id's separated by +/,

Comments

Tgr’s picture

Same goes for modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc/validate_argument: the map_assoc call at line 74 borks on empty arguments.

doublejosh’s picture

I believe this is the same issue I'm having.

If my "Taxonomy: Term ID" argument comes up empty (via "Provide default argument" > "PHP Code" ) then I get an error.
The argument is set to "Term IDs Separated by , or +" - "Only allow numeric UIDs" - "Display empty text" - and of course "Allow multiple terms per argument."

When I purely return false I get this...

* warning: Invalid argument supplied for foreach() in /var/www/spitter/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /var/www/spitter/includes/common.inc on line 1597.

With the arguments I'm supplying I get this (so I'm taking some blame.)

* warning: Invalid argument supplied for foreach() in /var/www/mysite/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: array_fill() [function.array-fill]: Number of elements must be positive in /var/www/mysite/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 72.
* warning: implode() [function.implode]: Bad arguments. in /var/www/mysite/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 72.
* warning: Invalid argument supplied for foreach() in /var/www/mysite/includes/common.inc on line 1597.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT * FROM term_data WHERE tid IN () in /var/www/mysite/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 77.

decafdennis’s picture

Version: 6.x-2.1 » 6.x-2.6

Still in an issue in 2.6. Subscribing.

merlinofchaos’s picture

Status: Active » Fixed

This is fixed in -dev.

Status: Fixed » Closed (fixed)

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