Skip to content

Commit

Permalink
Some variables were not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsaray committed Jul 18, 2016
1 parent 81b7e63 commit 355fcfa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Handler.php
Expand Up @@ -56,7 +56,9 @@ public function __construct(LoggerInterface $logger)
*/
public function session(callable $callable)
{
$this->values['session'] = $callable($_SESSION);
if (isset($_SESSION)) {
$this->values['session'] = $callable($_SESSION);
}
return $this;
}

Expand Down Expand Up @@ -116,7 +118,9 @@ public function environment(callable $callable)
*/
public function server(callable $callable)
{
$this->values['server'] = $callable($_SERVER);
if (isset($_SERVER)) {
$this->values['server'] = $callable($_SERVER);
}
return $this;
}

Expand Down

0 comments on commit 355fcfa

Please sign in to comment.