From 1b2ab309c4b0ae923147dff2bc533ca2e3af74bf Mon Sep 17 00:00:00 2001 From: Kelly Banman Date: Fri, 11 May 2012 22:32:19 -0700 Subject: [PATCH] Add support for non-string parameters in controller routes Signed-off-by: Kelly Banman --- laravel/routing/controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/laravel/routing/controller.php b/laravel/routing/controller.php index 0a780bbc..e81d6b5f 100644 --- a/laravel/routing/controller.php +++ b/laravel/routing/controller.php @@ -179,6 +179,8 @@ protected static function references(&$destination, &$parameters) // controllers with much less code than would be usual. foreach ($parameters as $key => $value) { + if ( ! is_string($value)) continue; + $search = '(:'.($key + 1).')'; $destination = str_replace($search, $value, $destination, $count);