Skip to content

Commit

Permalink
catch SourceImageNotFoundException on seoBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
clotildeh committed Mar 28, 2023
1 parent fb07294 commit 474d001
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions bundle/Core/MetaNameSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Ibexa\Core\FieldType\RelationList\Type as RelationListType;
use Ibexa\Core\FieldType\RelationList\Value as RelationListValue;
use Ibexa\Core\Helper\TranslationHelper;
use Ibexa\Core\MVC\Exception\SourceImageNotFoundException;
use Ibexa\Core\Repository\Helper\NameSchemaService;
use Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper;
use Ibexa\Core\Repository\Values\Content\VersionInfo;
Expand Down Expand Up @@ -298,12 +299,16 @@ protected function handleImageValue(ImageValue $value, $fieldDefinitionIdentifie
return '';
}

return $this->getVariation(
$value,
$fieldDefinitionIdentifier,
$languageCode,
'social_network_image'
);
try {
return $this->getVariation(
$value,
$fieldDefinitionIdentifier,
$languageCode,
'social_network_image'
);
} catch (SourceImageNotFoundException $e) {
return '';
}
}

/**
Expand Down

0 comments on commit 474d001

Please sign in to comment.