diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-12-24 06:48:57 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-12-24 06:48:57 +0000 |
commit | 57e402e0d011365acca6fdce6cbb07098abb0d79 (patch) | |
tree | 6baaa74ff11500d78d476a3a376a5b6fa78c5a85 | |
parent | 61b174e7d289b9e4bcf128636fde9f18112fbe79 (diff) | |
download | brdo-57e402e0d011365acca6fdce6cbb07098abb0d79.tar.gz brdo-57e402e0d011365acca6fdce6cbb07098abb0d79.tar.bz2 |
#10949: Incorrect output with invalid term id
-rw-r--r-- | modules/taxonomy.module | 4 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index cb1de14cc..19ececa09 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -906,6 +906,10 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { while ($term = db_fetch_object($result)) { $names[] = $term->name; } + if (count($names) == 0) { + drupal_not_found(); + return; + } drupal_set_title($title = implode(', ', $names)); switch ($op) { diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index cb1de14cc..19ececa09 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -906,6 +906,10 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { while ($term = db_fetch_object($result)) { $names[] = $term->name; } + if (count($names) == 0) { + drupal_not_found(); + return; + } drupal_set_title($title = implode(', ', $names)); switch ($op) { |