Skip to content

Commit da2d844

Browse files
authored
Fix auth issue, parentheses in the wrong location
Was causing too many arguments to be sent to cacti_sizeof which only take 1, instead of get_allowed_devices.
1 parent f80747e commit da2d844

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ function is_tree_branch_empty($tree_id, $parent = 0) {
929929
);
930930

931931
if (!cacti_sizeof($sites)) {
932-
if (cacti_sizeof($hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $hosts) . ')'), 'description', '', -1) > 0) {
932+
if (cacti_sizeof($hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $hosts) . ')', 'description', '', -1)) > 0) {
933933
return false;
934934
}
935935
} else {
@@ -945,7 +945,7 @@ function is_tree_branch_empty($tree_id, $parent = 0) {
945945
);
946946
}
947947

948-
if (cacti_sizeof($site_hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $site_hosts) . ')'), 'description', '', -1) > 0) {
948+
if (cacti_sizeof($site_hosts) && cacti_sizeof(get_allowed_devices('h.id IN(' . implode(',', $site_hosts) . ')', 'description', '', -1)) > 0) {
949949
return false;
950950
}
951951
}

0 commit comments

Comments
 (0)