Commit 7d3d5532 authored by Dries's avatar Dries
Browse files

- Fixed warning.

parent 6ba8f32c
......@@ -624,6 +624,7 @@ function taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
}
$max_depth = (is_null($max_depth)) ? count($children[$vid]) : $max_depth;
if ($children[$vid][$parent]) {
foreach ($children[$vid][$parent] as $child) {
if ($max_depth > $depth) {
$terms[$vid][$child]->depth = $depth;
......@@ -637,6 +638,7 @@ function taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
}
}
}
}
return $tree ? $tree : array();
}
......
......@@ -624,6 +624,7 @@ function taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
}
$max_depth = (is_null($max_depth)) ? count($children[$vid]) : $max_depth;
if ($children[$vid][$parent]) {
foreach ($children[$vid][$parent] as $child) {
if ($max_depth > $depth) {
$terms[$vid][$child]->depth = $depth;
......@@ -637,6 +638,7 @@ function taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
}
}
}
}
return $tree ? $tree : array();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment