[bugfix] $request == null breaks

The $request incoming as null was not properly detected by the if/elseif structure.
This commit is contained in:
Simon Erkelens 2018-02-05 11:46:58 +13:00 committed by Simon Erkelens
parent b81ac41b5d
commit a071672b48

View File

@ -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);