diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-07-02 18:46:42 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-07-02 18:46:42 +0000 |
commit | 9986cb36b5cedc45b8ccfc9db8f4afa1d3a36675 (patch) | |
tree | 58beed812e5dc8b937575137eabc6ebb981c6652 /modules/taxonomy | |
parent | 3701c02e59d7489331e8d298d5c7a7fd51b72b28 (diff) | |
download | brdo-9986cb36b5cedc45b8ccfc9db8f4afa1d3a36675.tar.gz brdo-9986cb36b5cedc45b8ccfc9db8f4afa1d3a36675.tar.bz2 |
- Patch #8973 by JonBob: Drupal contains many undefined variables and array indices, which makes PHP throw a lot of warnings when the reporting level is set to E_ALL. Things run fine with these warnings, but as a matter of code style if nothing else we should probably strive to avoid them. The attached fixes most of the more egregious offenders (about 95% of the warnings when I load /node on my test site).
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index f8c4226e5..8bd8ba1f1 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -38,7 +38,7 @@ function taxonomy_perm() { function taxonomy_link($type, $node = NULL) { if ($type == 'taxonomy terms' && $node != NULL) { $links = array(); - if ($node->taxonomy) { + if (array_key_exists('taxonomy', $node)) { foreach ($node->taxonomy as $tid) { $term = taxonomy_get_term($tid); $links[] = l($term->name, "taxonomy/page/or/$term->tid", $term->description ? array ('title' => $term->description) : array()); |