From d1b189e1e7d7fda46234759ec3010da423ec6a79 Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Thu, 7 Mar 2024 08:29:01 +1000 Subject: [PATCH] Remove dynamically created property for better (later) PHP compatibility. --- app/Models/OrgsModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/OrgsModel.php b/app/Models/OrgsModel.php index 8b8d7d615..bd6a001f0 100755 --- a/app/Models/OrgsModel.php +++ b/app/Models/OrgsModel.php @@ -163,9 +163,9 @@ public function getDescendants($id = 0) $org_list = array(); if (empty($this->orgs)) { $sql = 'SELECT * FROM orgs'; - $this->orgs = $this->db->query($sql)->getResult(); + $orgs = $this->db->query($sql)->getResult(); } - foreach ($this->orgs as $org) { + foreach ($orgs as $org) { if (intval($org->parent_id) === $id && intval($org->id) !== 1) { $org_list[] = intval($org->id); foreach ($this->getDescendants($org->id) as $org) {