Skip to content

Commit

Permalink
Real fix for E_WARNING in meta tag collector if semantic config does …
Browse files Browse the repository at this point in the history
…not exist
  • Loading branch information
emodric committed Dec 12, 2015
1 parent 9433c37 commit 1afd8f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MetaTag/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function collect( Content $content )

$allHandlers = $this->configResolver->hasParameter( 'global_handlers', 'netgen_open_graph' ) ?
$this->configResolver->getParameter( 'global_handlers', 'netgen_open_graph' ) :
array( 'all_content_types' => array() );
array();

$contentType = $this->contentTypeService->loadContentType( $content->contentInfo->contentTypeId );
$contentTypeHandlers = $this->configResolver->hasParameter( 'content_type_handlers', 'netgen_open_graph' ) ?
Expand All @@ -63,13 +63,13 @@ public function collect( Content $content )
if ( isset( $contentTypeHandlers[$contentType->identifier] ) )
{
$allHandlers = array_merge(
$allHandlers['all_content_types'],
isset( $allHandlers['all_content_types'] ) ? $allHandlers['all_content_types'] : array(),
$contentTypeHandlers[$contentType->identifier]
);
}
else
{
$allHandlers = $allHandlers['all_content_types'];
$allHandlers = isset( $allHandlers['all_content_types'] ) ? $allHandlers['all_content_types'] : array();
}

foreach ( $allHandlers as $handler )
Expand Down

0 comments on commit 1afd8f0

Please sign in to comment.