mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #3448 from dereuromark/master-controller
Controller::referer() and local URL
This commit is contained in:
commit
751d2d8f2d
2 changed files with 2 additions and 2 deletions
|
@ -970,7 +970,7 @@ class Controller extends Object implements CakeEventListener {
|
|||
|
||||
$referer = $this->request->referer($local);
|
||||
if ($referer === '/' && $default) {
|
||||
return Router::url($default, true);
|
||||
return Router::url($default, !$local);
|
||||
}
|
||||
return $referer;
|
||||
}
|
||||
|
|
|
@ -938,7 +938,7 @@ class AuthComponentTest extends CakeTestCase {
|
|||
array($CakeRequest, $CakeResponse)
|
||||
);
|
||||
|
||||
$expected = Router::url($this->Auth->loginRedirect, true);
|
||||
$expected = Router::url($this->Auth->loginRedirect);
|
||||
$Controller->expects($this->once())
|
||||
->method('redirect')
|
||||
->with($this->equalTo($expected));
|
||||
|
|
Loading…
Reference in a new issue