Add support for non-string parameters in controller routes

Signed-off-by: Kelly Banman <kelly.banman@gmail.com>
This commit is contained in:
Kelly Banman 2012-05-11 22:32:19 -07:00
parent d417eb5664
commit 1b2ab309c4
1 changed files with 2 additions and 0 deletions

View File

@ -179,6 +179,8 @@ protected static function references(&$destination, &$parameters)
// controllers with much less code than would be usual. // controllers with much less code than would be usual.
foreach ($parameters as $key => $value) foreach ($parameters as $key => $value)
{ {
if ( ! is_string($value)) continue;
$search = '(:'.($key + 1).')'; $search = '(:'.($key + 1).')';
$destination = str_replace($search, $value, $destination, $count); $destination = str_replace($search, $value, $destination, $count);