From b535ae41b5aff0e28544909d06f293d0c62149cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Tue, 13 Oct 2015 13:17:56 +0200 Subject: [PATCH] Fix `E_WARNING` in meta tag collector if semantic config does not exist --- MetaTag/Collector.php | 8 ++++++-- Resources/doc/CHANGELOG.md | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MetaTag/Collector.php b/MetaTag/Collector.php index 3c94aea..996d1da 100644 --- a/MetaTag/Collector.php +++ b/MetaTag/Collector.php @@ -51,10 +51,14 @@ public function collect( Content $content ) { $metaTags = array(); - $allHandlers = $this->configResolver->getParameter( 'global_handlers', 'netgen_open_graph' ); + $allHandlers = $this->configResolver->hasParameter( 'global_handlers', 'netgen_open_graph' ) ? + $this->configResolver->getParameter( 'global_handlers', 'netgen_open_graph' ) : + array( 'all_content_types' => array() ); $contentType = $this->contentTypeService->loadContentType( $content->contentInfo->contentTypeId ); - $contentTypeHandlers = $this->configResolver->getParameter( 'content_type_handlers', 'netgen_open_graph' ); + $contentTypeHandlers = $this->configResolver->hasParameter( 'content_type_handlers', 'netgen_open_graph' ) ? + $this->configResolver->getParameter( 'content_type_handlers', 'netgen_open_graph' ) : + array(); if ( isset( $contentTypeHandlers[$contentType->identifier] ) ) { diff --git a/Resources/doc/CHANGELOG.md b/Resources/doc/CHANGELOG.md index 5b57ba8..8fb8fe1 100644 --- a/Resources/doc/CHANGELOG.md +++ b/Resources/doc/CHANGELOG.md @@ -1,6 +1,10 @@ Netgen Open Graph Bundle changelog ================================== +## 1.1.2 (13.10.2015) + +* Fix `E_WARNING` in meta tag collector if semantic config does not exist + ## 1.1.1 (17.08.2015) * Make sure `ezimage` field type handler generates full image URI even when variation returns the relative URI