Skip to content
Snippets Groups Projects
Commit 80b20d70 authored by David Siegfried's avatar David Siegfried
Browse files

prevent php8 warnings, fixes #2079

Closes #2079

Merge request studip/studip!1559
parent 073932aa
No related branches found
No related tags found
No related merge requests found
......@@ -501,7 +501,10 @@ class StudipRangeTreeViewAdmin extends TreeView{
function isItemAdmin($item_id){
$admin_ranges = $this->tree->getAdminRange($item_id);
for ($i = 0; $i < count($admin_ranges); ++$i){
if ($this->tree_status[$admin_ranges[$i]] == 1){
if (
isset($this->tree_status[$admin_ranges[$i]])
&& $this->tree_status[$admin_ranges[$i]] == 1
) {
return true;
}
}
......@@ -512,7 +515,10 @@ class StudipRangeTreeViewAdmin extends TreeView{
$admin_ranges = $this->tree->getAdminRange($this->tree->tree_data[$item_id]['parent_id']);
if (!empty($admin_ranges)) {
for ($i = 0; $i < count($admin_ranges); ++$i) {
if ($this->tree_status[$admin_ranges[$i]] == 1) {
if (
isset($this->tree_status[$admin_ranges[$i]])
&& $this->tree_status[$admin_ranges[$i]] == 1
) {
return true;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment