From 26c29216d95787bccea56b05d952ca21528cc3b7 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 26 Mar 2015 16:55:13 +0100 Subject: [PATCH] syntax --- htdocs/comm/action/class/actioncomm.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 9a9417a4dac..bc66514940d 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -413,7 +413,8 @@ class ActionComm extends CommonObject $resql=$this->db->query($sql); if ($resql) { - if ($this->db->num_rows($resql)) + $num=$this->db->num_rows($resql); + if ($num) { $obj = $this->db->fetch_object($resql); @@ -469,13 +470,15 @@ class ActionComm extends CommonObject $this->elementtype = $obj->elementtype; } $this->db->free($resql); - return 1; } else { $this->error=$this->db->lasterror(); return -1; } + + return $num; + }