diff --git a/batch/enrichissement.php b/batch/enrichissement.php index 1ad2d329..95b67d4b 100644 --- a/batch/enrichissement.php +++ b/batch/enrichissement.php @@ -230,7 +230,7 @@ $dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', $db = Zend_Db::factory($dbConfig->db); $commandesM = new Application_Model_Commandes($db); -$commande = $commandesM->find(intval($opts->id)); +$commande = $commandesM->find(intval($opts->id))->current(); $file = basename($commande->fichier); $extension = strrchr($file,'.'); $file = str_replace($extension, '', $file); @@ -240,7 +240,7 @@ if (!file_exists($path->data.'/export')) mkdir($path->data.'/export'); $outFile = $path->data.'/export/'.$file.'-'.date('YmdHis').'.csv'; $profilM = new Application_Model_Profil($db); -$profil = $profilM->find($commande->idProfil); +$profil = $profilM->find($commande->idProfil)->current(); //Chargement des classes metier require_once realpath(dirname(__FILE__)).'/../config/config.php';