diff --git a/scripts/jobs/enrichissement.php b/scripts/jobs/enrichissement.php index d102cea7..522de784 100644 --- a/scripts/jobs/enrichissement.php +++ b/scripts/jobs/enrichissement.php @@ -1279,6 +1279,7 @@ function AdresseNormaliseEntete($values) function AdresseNormaliseData($siren, $nic, $values = false) { + $output = array(); try { $etabM = new Application_Model_JoEtablissements(); $sql = $etabM->select(true)->columns(array('LPAD(source,3,0)', 'LPAD(source_id,20,0)')) @@ -1299,12 +1300,12 @@ function AdresseNormaliseData($siren, $nic, $values = false) } catch (Exception $e) {} $head = AdresseNormaliseEntete(''); - foreach($item as $head) { + foreach($head as $item) { $output[$item] = ''; } if ($infoRNVP !== null) { - foreach ($item as $head) { + foreach ($head as $item) { $output[$item] = $infoRNVP->{$item}; } }