summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-09-26 23:31:36 +0000
committerDries Buytaert <dries@buytaert.net>2010-09-26 23:31:36 +0000
commit3780b17654a2af093c854f9c32bd2d6e102ec16c (patch)
tree0289b1288109ca1baecbddc7192f1cea84227e3a /modules/taxonomy
parent88bc80a5974a5ff6bfedf0083934e791bf7cfcd7 (diff)
downloadbrdo-3780b17654a2af093c854f9c32bd2d6e102ec16c.tar.gz
brdo-3780b17654a2af093c854f9c32bd2d6e102ec16c.tar.bz2
- Patch #921606 by munzirtaha, bleen18: various code uses is_null().
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index ae3debc19..107bf7aa7 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -841,7 +841,7 @@ function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $depth = -1) {
}
}
- $max_depth = (is_null($max_depth)) ? count($children[$vid]) : $max_depth;
+ $max_depth = (!isset($max_depth)) ? count($children[$vid]) : $max_depth;
$tree = array();
if ($max_depth > $depth && !empty($children[$vid][$parent])) {
foreach ($children[$vid][$parent] as $child) {
@@ -1038,7 +1038,7 @@ function taxonomy_implode_tags($tags, $vid = NULL) {
$typed_tags = array();
foreach ($tags as $tag) {
// Extract terms belonging to the vocabulary in question.
- if (is_null($vid) || $tag->vid == $vid) {
+ if (!isset($vid) || $tag->vid == $vid) {
// Make sure we have a completed loaded taxonomy term.
if (isset($tag->name)) {
// Commas and quotes in tag names are special cases, so encode 'em.