Skip to content

Commit 474d001

Browse files
author
clotildeh
committed
catch SourceImageNotFoundException on seoBundle
1 parent fb07294 commit 474d001

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

bundle/Core/MetaNameSchema.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Ibexa\Core\FieldType\RelationList\Type as RelationListType;
3131
use Ibexa\Core\FieldType\RelationList\Value as RelationListValue;
3232
use Ibexa\Core\Helper\TranslationHelper;
33+
use Ibexa\Core\MVC\Exception\SourceImageNotFoundException;
3334
use Ibexa\Core\Repository\Helper\NameSchemaService;
3435
use Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper;
3536
use Ibexa\Core\Repository\Values\Content\VersionInfo;
@@ -298,12 +299,16 @@ protected function handleImageValue(ImageValue $value, $fieldDefinitionIdentifie
298299
return '';
299300
}
300301

301-
return $this->getVariation(
302-
$value,
303-
$fieldDefinitionIdentifier,
304-
$languageCode,
305-
'social_network_image'
306-
);
302+
try {
303+
return $this->getVariation(
304+
$value,
305+
$fieldDefinitionIdentifier,
306+
$languageCode,
307+
'social_network_image'
308+
);
309+
} catch (SourceImageNotFoundException $e) {
310+
return '';
311+
}
307312
}
308313

309314
/**

0 commit comments

Comments
 (0)