From 47d4b6918e3c410bc02c0c721e2e28d239ca12b9 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 29 May 2013 15:15:21 +0000 Subject: [PATCH] Remove notice --- library/Scores/IdentiteEntreprise.php | 29 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/library/Scores/IdentiteEntreprise.php b/library/Scores/IdentiteEntreprise.php index c42f6e08e..14bccbbd1 100644 --- a/library/Scores/IdentiteEntreprise.php +++ b/library/Scores/IdentiteEntreprise.php @@ -82,7 +82,7 @@ class IdentiteEntreprise return 'Non attribué dans les D.O.M.'; } - $data.= substr($this->identite->TvaNumero,0,2).' '. + $data = substr($this->identite->TvaNumero,0,2).' '. substr($this->identite->TvaNumero,2,2).' '. substr($this->identite->TvaNumero,-9); if (!$this->identite->TvaAttribue) @@ -207,11 +207,10 @@ class IdentiteEntreprise } public function getActifTexte() { - + $data = ''; if ( $this->identite->AncienSiege==1 - || count($this->identite->AutreSiret->item)>0 - || ($this->identite->ActifEco==0 && !empty($this->identite->ActifEcoDate)) - || count($this->identite->AutreSiret->item)>0 ) + || ( property_exists($this->identite->AutreSiret, 'item') && count($this->identite->AutreSiret->item)>0 ) + || ( $this->identite->ActifEco==0 && !empty($this->identite->ActifEcoDate) ) ) { $title = ''; @@ -311,9 +310,8 @@ class IdentiteEntreprise } if ( $this->identite->AncienSiege==1 - || count($this->identite->AutreSiret->item)>0 - || ($this->identite->ActifEco==0 && !empty($this->identite->ActifEcoDate)) - || count($this->identite->AutreSiret->item)>0 ) + || ( property_exists($this->identite->AutreSiret, 'item') && count($this->identite->AutreSiret->item)>0 ) + || ($this->identite->ActifEco==0 && !empty($this->identite->ActifEcoDate)) ) { $data.= ''; } @@ -327,6 +325,7 @@ class IdentiteEntreprise $data.='   (Situation au répertoire SIRENE)'; } + return $data; } @@ -395,7 +394,7 @@ class IdentiteEntreprise { $typeLib = array('doublon'=>'Doublon Insee'); $data = false; - if(count($this->identite->AutreSiren->item)>0) { + if( property_exists($this->identite->AutreSiren, 'item') && count($this->identite->AutreSiren->item)>0) { foreach($this->identite->AutreSiren->item as $doublon) { if(in_array($doublon->type, array_keys($typeLib))) { $data.= '