Skip to content
Browse files

Make referer() behave as expected.

  • Loading branch information...
dereuromark committed Apr 28, 2014
1 parent a28158d commit 43d359b1d7e083c9c7cb9afb5ad7995d2aea1641
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Controller/Controller.php
@@ -970,7 +970,7 @@ public function referer($default = null, $local = false) {
$referer = $this->request->referer($local);
if ($referer === '/' && $default) {
return Router::url($default, true);
return Router::url($default, !$local);
return $referer;

2 comments on commit 43d359b


This comment has been minimized.

Copy link

jvalecillos replied Sep 2, 2014

This change causes a bug for redirection showed when using AuthComponent. The error consists on duplication of base folder (project folder) in the url. E.g. http://localhost/cakephp/test will be redirected to http://localhost/cakephp/cakephp.


This comment has been minimized.

Copy link
Member Author

dereuromark replied Sep 3, 2014

Reverting this wouldn't solve the source of the issue, though.
We need to find the actual problem underneath instead of fixing the symptoms :)

Please sign in to comment.
You can’t perform that action at this time.