Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michb committed Jun 27, 2022
1 parent e8f71da commit ff6c0f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/EventListener/Importer/AdListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ private function attributeIsTrue( $adAttribute=[] ): bool {
*/
private function getValueFromSpecifics( $adAttribute, bool $isArray=false ) {

if( $adAttribute === null ) {
return '';
}
if( is_string($adAttribute) ) {
return $adAttribute;
}
Expand Down Expand Up @@ -347,7 +350,7 @@ private function importAd( $ad ): int {
, 'class' => $ad['vehicle']['class']['local-description']
, 'category' => $ad['vehicle']['category']['local-description']
, 'make' => $ad['vehicle']['make']['local-description']
, 'model' => $ad['vehicle']['model']['local-description']
, 'model' => $ad['vehicle']['model']['local-description'] ?? ''
, 'model_description' => $ad['vehicle']['model-description']['@attributes']['value']
, 'damage_and_unrepaired' => ($this->attributeIsTrue($ad['vehicle']['damage-and-unrepaired'])) ? '1' : ''
, 'accident_damaged' => ($this->attributeIsTrue($ad['vehicle']['accident-damaged'])) ? '1' : ''
Expand Down

0 comments on commit ff6c0f7

Please sign in to comment.