Skip to content

Commit

Permalink
Fix exception on no firewall listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAdam committed Dec 2, 2012
1 parent a70f07e commit dbf03a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DataCollector/SecurityDataCollector.php
Expand Up @@ -26,7 +26,7 @@ public function collect(Request $request, Response $response, \Exception $ex = n
$listeners = array();
$listenerTrace = $this->firewall->getListenerTrace();
$handlingListener = $this->firewall->getHandlingListener();
foreach ($this->firewall->getListeners() as $listener) {
foreach ($this->firewall->getListeners() ?: array() as $listener) {
$data = array(
'class' => $class = get_class($listener),
'short_name' => substr($class, strrpos($class, '\\') + 1),
Expand All @@ -49,4 +49,4 @@ public function getListeners()
{
return $this->data['listeners'];
}
}
}

0 comments on commit dbf03a8

Please sign in to comment.