diff --git a/src/Security/Security.php b/src/Security/Security.php index c33ce0475..f40a5a4c5 100644 --- a/src/Security/Security.php +++ b/src/Security/Security.php @@ -651,7 +651,7 @@ class Security extends Controller implements TemplateGlobalProvider { if ($request) { $this->setRequest($request); - } elseif ($request) { + } elseif ($this->getRequest()) { $request = $this->getRequest(); } else { throw new HTTPResponse_Exception("No request available", 500);