diff --git a/src/includes/class/class.LSformElement_supannRessourceEtat.php b/src/includes/class/class.LSformElement_supannRessourceEtat.php index 989c8b8f..fd62d1d8 100644 --- a/src/includes/class/class.LSformElement_supannRessourceEtat.php +++ b/src/includes/class/class.LSformElement_supannRessourceEtat.php @@ -72,8 +72,9 @@ class LSformElement_supannRessourceEtat extends LSformElement_supannCompositeAtt $parseValue = array( 'ressource' => $matches['ressource'], 'etat' => $matches['etat'], - 'sous_etat' => (isset($matches['sous_etat'])?$matches['sous_etat']:null), ); + if (isset($matches['sous_etat'])) + $parseValue['sous_etat'] = $matches['sous_etat']; return $parseValue; } return; diff --git a/src/includes/class/class.LSformElement_supannRessourceEtatDate.php b/src/includes/class/class.LSformElement_supannRessourceEtatDate.php index 67948370..b259f4b3 100644 --- a/src/includes/class/class.LSformElement_supannRessourceEtatDate.php +++ b/src/includes/class/class.LSformElement_supannRessourceEtatDate.php @@ -84,10 +84,10 @@ class LSformElement_supannRessourceEtatDate extends LSformElement_supannComposit $parseValue = array( 'ressource' => $matches['ressource'], 'etat' => $matches['etat'], - 'sous_etat' => (isset($matches['sous_etat'])?$matches['sous_etat']:null), - 'date_debut' => (isset($matches['date_debut'])?$matches['date_debut']:null), - 'date_fin' => (isset($matches['date_fin'])?$matches['date_fin']:null), ); + foreach(array('sous_etat', 'date_debut', 'date_fin') as $c => $cconf) + if (isset($matches[$c])) + $parseValue[$c] = $matches[$c]; return $parseValue; } return;