Skip to content

Commit

Permalink
Fixing changes made in commit 522446e to works with PHP 5.2-. Refs #974
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Aug 1, 2010
1 parent 509a9e1 commit 7e7a2c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cake/libs/router.php
Expand Up @@ -1351,10 +1351,11 @@ function _writeRoute() {
$route = $this->template;
$names = $routeParams = array();
$parsed = preg_quote($this->template, '#');
$parsed = str_replace('\\-', '-', $parsed);

preg_match_all('#:([A-Za-z0-9_-]+[A-Z0-9a-z])#', $this->template, $namedElements);
preg_match_all('#:([A-Za-z0-9_-]+[A-Z0-9a-z])#', $parsed, $namedElements);
foreach ($namedElements[1] as $i => $name) {
$search = '\\' . str_replace('-', '\\-', $namedElements[0][$i]);
$search = '\\' . $namedElements[0][$i];
if (isset($this->options[$name])) {
$option = null;
if ($name !== 'plugin' && array_key_exists($name, $this->defaults)) {
Expand Down

0 comments on commit 7e7a2c5

Please sign in to comment.