Skip to content

Commit

Permalink
Fix undocumented false return value that was most likely an oversight.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 25, 2016
1 parent 177136c commit 0736f23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Routing/Router.php
Expand Up @@ -458,7 +458,9 @@ public static function popRequest()
public static function getRequest($current = false)
{
if ($current) {
return end(static::$_requests);
$request = end(static::$_requests);

return $request ?: null;
}

return isset(static::$_requests[0]) ? static::$_requests[0] : null;
Expand Down

0 comments on commit 0736f23

Please sign in to comment.