noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 81/218: adapt to 7.2 , error with sizeof


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 81/218: adapt to 7.2 , error with sizeof
Date: Thu, 12 Sep 2019 15:58:45 -0400 (EDT)

sparkyx pushed a commit to branch entreprise
in repository noalyss.

commit 7c74247408dbb0fae3e8997259a86145d1cd24af
Author: Dany De Bontridder <address@hidden>
Date:   Sat Oct 20 09:20:44 2018 +0200

    adapt to 7.2  ,error with sizeof
---
 include/class/fiche.class.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index a989727..00d1a00 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -57,6 +57,8 @@ class Fiche
         $this->cn=$p_cn;
         $this->id=$p_id;
         $this->quick_code='';
+        $this->attribut=[];
+        
     }
     /**
      *@brief used with a usort function, to sort an array of Fiche on the name
@@ -344,8 +346,8 @@ class Fiche
      */
     function strAttribut($p_ad_id,$p_return=1)
     {
-               $return=($p_return==1)?NOTFOUND:"";
-        if ( sizeof ($this->attribut) == 0 )
+       $return=($p_return==1)?NOTFOUND:"";
+        if (is_array($this->attribut) && sizeof ($this->attribut) == 0 )
         {
 
             if ($this->id==0) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]