Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redirectUrl issue when loginRedirect is empty #9840

Merged
merged 2 commits into from Dec 4, 2016

Conversation

chinpei215
Copy link
Contributor

Fixes #9819

@chinpei215 chinpei215 added this to the 2.9.4 milestone Dec 4, 2016
@@ -742,6 +742,9 @@ public function redirectUrl($url = null) {

if (Router::normalize($redir) === Router::normalize($this->loginAction)) {
$redir = $this->loginRedirect;
if (!$redir) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using ternary $redir = $this->loginRedirect ?$this->loginRedirect : '/'

@ADmad ADmad closed this Dec 4, 2016
@chinpei215
Copy link
Contributor Author

chinpei215 commented Dec 4, 2016

@ADmad May I reopen this PR? 😭

@chinpei215 chinpei215 reopened this Dec 4, 2016
@ADmad
Copy link
Member

ADmad commented Dec 4, 2016

@chinpei215 Woops, definitely didn't want to do that :P

@markstory markstory merged commit 14192ba into cakephp:2.x Dec 4, 2016
@markstory
Copy link
Member

Nice work!

@chinpei215 chinpei215 deleted the 2.x-blank-redir branch December 4, 2016 15:22
@chinpei215
Copy link
Contributor Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants