Call getRequest() only once in Auth::authHttp()

refs #11151
This commit is contained in:
Alexander A. Klimov 2016-02-15 10:44:33 +01:00
parent 4c97fb7d01
commit dc9cfc1c81
1 changed files with 3 additions and 2 deletions

View File

@ -278,10 +278,11 @@ class Auth
*/ */
protected function authHttp() protected function authHttp()
{ {
if ($this->getRequest()->isXmlHttpRequest()) { $request = $this->getRequest();
if ($request->isXmlHttpRequest()) {
return false; return false;
} }
if (($header = $this->getRequest()->getHeader('Authorization')) === false) { if (($header = $request->getHeader('Authorization')) === false) {
return false; return false;
} }
if (empty($header)) { if (empty($header)) {