diff --git a/application/controllers/ComptageController.php b/application/controllers/ComptageController.php index fce668a2..c5fe45bd 100644 --- a/application/controllers/ComptageController.php +++ b/application/controllers/ComptageController.php @@ -212,10 +212,13 @@ class ComptageController extends Zend_Controller_Action ->where('idClient = ?', $user->idClient); $result = $profilsM->fetchRow($sql); - //@todo : Si il n'existe pas de profil, que faire .... - $profil = json_decode($result['criteres'], true); + //No profil, define it + if (count($profil)==0) { + $profil = array('raisonSociale'); + } + $extractSql = $extractLabel = array(); //$extractSql[] = "CONCAT(LPAD(siren, 9, '000000000'), LPAD(nic, 5, '00000')) AS siret"; //$extractLabel[] = 'SIRET';