#5978: Router::normailze function generates bad url
-------------------------------------------+--------------------------------
Reporter: maksap | Owner: nate
Type: Test Case | Status: reopened
Priority: Medium | Milestone: 1.2.x.x
Component: Routing/Dispatcher | Version: RC3
Severity: Normal | Resolution:
Keywords: url normalize base baseurl | Php_version: n/a
Cake_version: 1.2.0.7692 RC3 |
-------------------------------------------+--------------------------------
Comment (by masom):
The culprit: preg_replace() with 1 at the end, it's gonna remove the first
occurence of the pattern. The problem I face is the plugin starts with the
same characters as the app name, thus is removed since beers contains
beer, beer is stripped and leaves me with s (see above) /s/add
cake/libs/router.php @ 1196
{{{
if (!empty($paths['base']) && stristr($url, $paths['base'])) {
$url = preg_replace('/' .
preg_quote($paths['base'], '/') . '/', '', $url, 1);
}
}}}
--
Ticket URL: <https://trac.cakephp.org/ticket/5978#comment:7>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---