Skip to content

Commit

Permalink
Fix issue that break fallback to yml configuration if content field m…
Browse files Browse the repository at this point in the history
…eta is empty

A simple check if $configuration[$meta->getName()] for the field is not empty before overriding configuration pattern.
Otherwise the configuration set from yml file is overriden with empty data.
  • Loading branch information
oportier authored and Plopix committed Feb 3, 2017
1 parent 686ad5c commit 6345b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Twig/NovaeZSEOExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ protected function innerComputeMetas( Content $content, $fieldDefIdentifier, Con
$fieldDefinition = $contentType->getFieldDefinition( $fieldDefIdentifier );
$configuration = $fieldDefinition->getFieldSettings()['configuration'];
// but if we need something is the configuration we take it
if ( isset($configuration[$meta->getName()]) )
if ( isset($configuration[$meta->getName()]) && !empty($configuration[$meta->getName()]) )
{
$meta->setContent( $configuration[$meta->getName()] );
}
Expand Down

0 comments on commit 6345b63

Please sign in to comment.