diff --git a/application/controllers/IdentiteController.php b/application/controllers/IdentiteController.php index b05e74bbf..f989e0c3c 100644 --- a/application/controllers/IdentiteController.php +++ b/application/controllers/IdentiteController.php @@ -46,6 +46,7 @@ class IdentiteController extends Zend_Controller_Action if (empty($autrePage)) { $ws = new WsScores(); $infos = $ws->getIdentite($this->siret, $this->id); + if ($infos === false) $this->_forward('soap', 'error'); } else { $infos = $this->getRequest()->getParam('infos'); } @@ -166,6 +167,7 @@ class IdentiteController extends Zend_Controller_Action //Récupération des informations $ws = new WsScores(); $infos = $ws->getIdentiteProcol($this->siret, $this->id); + if ($infos === false) $this->_forward('soap', 'error'); //Mise en session $session = new SessionEntreprise($this->siret, $this->id); @@ -275,6 +277,7 @@ class IdentiteController extends Zend_Controller_Action $ws = new WsScores(); $infos = $ws->getListeEtablissements($siren, $actif); + if ($infos === false) $this->_forward('soap', 'error'); $etabs = $infos->result->item; diff --git a/application/controllers/JuridiqueController.php b/application/controllers/JuridiqueController.php index 926ab940d..a94c23c12 100644 --- a/application/controllers/JuridiqueController.php +++ b/application/controllers/JuridiqueController.php @@ -50,7 +50,8 @@ class JuridiqueController extends Zend_Controller_Action Zend_Registry::get('firebug')->info('Filtre : '.$filtre); $ws = new WsScores(); $infos = $ws->getAnnonces($siren, $filtre, $idAnn); - + if ($infos === false) $this->_forward('soap', 'error'); + require_once 'Scores/Annonces.php'; $objAnnonces = new Annonces($infos->result->item); @@ -130,6 +131,8 @@ class JuridiqueController extends Zend_Controller_Action $ws = new WsScores(); $infos = $ws->getInfosReg($siren); + if ($infos === false) $this->_forward('soap', 'error'); + Zend_Registry::get('firebug')->info($infos); $objAnnonces = $infos->result->item; $annonces = array(); @@ -176,6 +179,8 @@ class JuridiqueController extends Zend_Controller_Action if (!empty($type)){ $ws = new WsScores(); $infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune()); + if ($infos === false) $this->_forward('soap', 'error'); + $competences = $infos->result->item; Zend_Registry::get('firebug')->info($infos); if( $type=='tri' || $type=='cfe' ) { @@ -221,6 +226,8 @@ class JuridiqueController extends Zend_Controller_Action $this->view->assign('raisonSociale', $session->getRaisonSociale()); $ws = new WsScores(); $infos = $ws->getMarques($siren, $idObject); + if ($infos === false) $this->_forward('soap', 'error'); + $marques = $infos->result->item; $this->view->assign('marques', $marques); $this->view->assign('idObject', $idObject);