The following error occurs because the value 0 is inputted for some reason as the argument.

Notice: Undefined index: 0 in taxonomy_term_load() (line 1215 of C:\Data\Website\drupal7\modules\taxonomy\taxonomy.module).

In views_handler_argument_taxonomy.inc, the function "title()" doesn't check to see if the taxonomy term ID exists, so when the number 0 is inputted, we get the above error.

I fixed this by adding an if-statement before the call to "taxonomy_term_load(...)" function. See below:

views_handler_argument_taxonomy.inc

  function title() {
    if($this->argument != 0) {
       $term = taxonomy_term_load($this->argument);
       if (!empty($term)) {
         return check_plain($term->name);
       }
    }
    // TODO review text
    return t('No name');
  }

Comments

dawehner’s picture

Status: Active » Fixed

Thanks this makes absolute sense. Commited a real patch to 7.x-3.x and 6.x-3.x

Status: Fixed » Closed (fixed)

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