Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2011 at 12:12 UTC
Updated:
9 Nov 2011 at 07:40 UTC
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
Comment #1
dawehnerThanks this makes absolute sense. Commited a real patch to 7.x-3.x and 6.x-3.x