Unverified Commit 42659793 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(config) Avoid using count on non-existing var

issue #6026
Showing with 1 addition and 8 deletions
+1 -8
......@@ -800,13 +800,6 @@ class config
/* Walk through array */
ksort($arr);
foreach ($arr as $name => $entries) {
/* If this department is the last in the current tree position
* remove it, to avoid generating output for it */
if (count($entries['SUB']) == 0) {
unset($entries['SUB']);
}
/* Fix name, if it contains a replace tag */
$name = preg_replace('/\\\\,/', ',', $name);
......@@ -825,7 +818,7 @@ class config
}
/* recursive add of subdepartments */
if (isset($entries['SUB'])) {
if (!empty($entries['SUB'])) {
$ret = array_merge($ret, $this->generateDepartmentArray($entries['SUB'], $depth, $max_size));
}
}
......
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