Skip to content

Commit

Permalink
check if global exists before returning it
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed May 29, 2014
1 parent 6e3a2a7 commit 3eaa542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/legacy/Zikula/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function unregisterService($id)

public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
if ($id === 'request') {
if ($id === 'request' && isset($GLOBALS['__request'])) {
return $GLOBALS['__request'];
}

Expand Down

0 comments on commit 3eaa542

Please sign in to comment.