Skip to content

Commit

Permalink
Remove dynamically created property for better (later) PHP compatibil…
Browse files Browse the repository at this point in the history
…ity.
  • Loading branch information
mark-unwin committed Mar 6, 2024
1 parent f9969d2 commit d1b189e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/OrgsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d1b189e

Please sign in to comment.