diff --git a/src/Controller/Component/AuthComponent.php b/src/Controller/Component/AuthComponent.php index 14c548407b1..df92d2be985 100644 --- a/src/Controller/Component/AuthComponent.php +++ b/src/Controller/Component/AuthComponent.php @@ -682,7 +682,7 @@ public function redirectUrl($url = null) { $redir = $this->Session->read('Auth.redirect'); $this->Session->delete('Auth.redirect'); - if (Router::normalize($redir) == Router::normalize($this->_config['loginAction'])) { + if (Router::normalize($redir) === Router::normalize($this->_config['loginAction'])) { $redir = $this->_config['loginRedirect']; } } elseif ($this->_config['loginRedirect']) { diff --git a/src/Controller/Component/RequestHandlerComponent.php b/src/Controller/Component/RequestHandlerComponent.php index f512b5c0975..ed76d77c76a 100644 --- a/src/Controller/Component/RequestHandlerComponent.php +++ b/src/Controller/Component/RequestHandlerComponent.php @@ -426,7 +426,7 @@ public function requestedWith($type = null) { return $this->response->mapType($contentType); } if (is_string($type)) { - return ($type == $this->response->mapType($contentType)); + return ($type === $this->response->mapType($contentType)); } }