mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Making sure default extension is always set when Router::parseExtensions() is used
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6507 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
017afa637d
commit
12466ebe43
2 changed files with 4 additions and 1 deletions
|
@ -502,6 +502,9 @@ class Router extends Object {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (empty($ext)) {
|
||||
$ext = 'html';
|
||||
}
|
||||
}
|
||||
return compact('ext', 'url');
|
||||
}
|
||||
|
|
|
@ -766,7 +766,7 @@ class RouterTest extends UnitTestCase {
|
|||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->router->parse('/posts.atom?hello=goodbye');
|
||||
$expected = array('plugin' => null, 'controller' => 'posts.atom', 'action' => 'index', 'pass' => array(), 'named' => array());
|
||||
$expected = array('plugin' => null, 'controller' => 'posts.atom', 'action' => 'index', 'pass' => array(), 'named' => array(), 'url' => array('ext' => 'html'));
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->router->reload();
|
||||
|
|
Loading…
Add table
Reference in a new issue