Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Check for a valid container before injection
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Mar 2, 2016
1 parent 341919c commit 1c1d2a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/HelperPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ public function injectEventManager($first, $second)
$helper = $first;
}

if (! $container) {
// Under zend-navigation v2.5, the navigation PluginManager is
// always lazy-loaded, which means it never has a parent
// container.
return;
}

if (! $helper instanceof EventManagerAwareInterface) {
return;
}
Expand Down

0 comments on commit 1c1d2a1

Please sign in to comment.