Bug Report #4184
3.2 Request::redirect bug
| Status: | Closed | Start date: | 08/06/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Core | |||
| Target version: | v3.2.1 | |||
| Resolution: | duplicate | Points: | 1 |
Description
(Kohana::$index_file = index.php;)
In my controller
$this->request->redirect('home');
The redirect creates an url and calls
$url = URL::site($url, TRUE, Kohana::$index_file);
URL::site calls URL::base like so:
return URL::base($protocol, $index).$path;
Note that here $index has the value of Kohana::$index_file, in this case 'index.php', it is not a boolean.
Then in URL::base
if ($index === TRUE AND ! empty(Kohana::$index_file))
$index is not TRUE because it was set to 'index.php' in Request::redirect.
I suggest changing
$url = URL::site($url, TRUE, Kohana::$index_file);
to something like
$url = URL::site($url, TRUE, ! empty(Kohana::$index_file));
History
Updated by Sam de Freyssinet 9 months ago
- Category set to Core
- Status changed from New to Closed
- Assignee set to Sam de Freyssinet
- Resolution set to duplicate
This has already been reported #4141 and will be fixed