From a44f5376dafc665f1bb8fb2962e6a389853d895c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Jul 2020 00:27:30 +0200 Subject: [PATCH] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 03b220f314a..a2f3d1159e5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2542,9 +2542,8 @@ abstract class CommonObject $resql = $this->db->query($sql); if ($resql) { - if($this->db->num_rows($resql) > 0) { - while($row = $this->db->fetch_row($resql)) { - + if ($this->db->num_rows($resql) > 0) { + while ($row = $this->db->fetch_row($resql)) { $rows[] = $row[0]; if (!empty($includealltree)) $rows = array_merge($rows, $this->getChildrenOfLine($row[0]), $includealltree); }