mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-01 23:29:45 +00:00
commit
621b086d9c
2 changed files with 20 additions and 1 deletions
lib/Cake
|
@ -240,7 +240,7 @@ class CakeRoute {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($route['_trailing_'])) {
|
if (isset($route['_trailing_'])) {
|
||||||
$route['pass'][] = $route['_trailing_'];
|
$route['pass'][] = rawurldecode($route['_trailing_']);
|
||||||
unset($route['_trailing_']);
|
unset($route['_trailing_']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -857,4 +857,23 @@ class CakeRouteTest extends CakeTestCase {
|
||||||
);
|
);
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the /** special type on parsing - UTF8.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function testParseTrailingUTF8() {
|
||||||
|
$route = new CakeRoute( '/category/**', array('controller' => 'categories','action' => 'index'));
|
||||||
|
$result = $route->parse('/category/%D9%85%D9%88%D8%A8%D8%A7%DB%8C%D9%84');
|
||||||
|
$expected = array(
|
||||||
|
'controller' => 'categories',
|
||||||
|
'action' => 'index',
|
||||||
|
'pass' => array('موبایل'),
|
||||||
|
'named' => array()
|
||||||
|
);
|
||||||
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue