Skip to content

Commit

Permalink
Ensure the default controller param is used if a controller part was …
Browse files Browse the repository at this point in the history
…not matched from the URL. Followup to 83d0f21.
  • Loading branch information
kiall committed Feb 13, 2012
1 parent 83d0f21 commit 2ed1d30
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions classes/Kohana/Route.php
Expand Up @@ -457,8 +457,11 @@ public function matches($uri)
}
}

// Ucfirst the controller, if it was matched from the URL, for PSR-0.
$params['controller'] = ucfirst(strtolower($params['controller']));
if (array_key_exists('controller', $params))

This comment has been minimized.

Copy link
@Yahasana

Yahasana Feb 14, 2012

Contributor

should be if ( ! empty($params['controller']))

This comment has been minimized.

Copy link
@shadowhand

shadowhand Feb 14, 2012

Contributor

Agreed.

{
// Ucfirst the controller, if it was matched from the URL, for PSR-0.
$params['controller'] = ucfirst(strtolower($params['controller']));
}

foreach ($this->_defaults as $key => $value)
{
Expand Down

0 comments on commit 2ed1d30

Please sign in to comment.