From c7e7d64545a7739af4bcd252d2b82ba51463060f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 30 Jun 2011 07:45:05 -0700 Subject: [PATCH] Refactoring dynamic URLs to routes. --- system/url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/url.php b/system/url.php index 4bc7d10c..dfcd8208 100644 --- a/system/url.php +++ b/system/url.php @@ -142,12 +142,13 @@ class URL { */ public static function __callStatic($method, $parameters) { + $parameters = (isset($parameters[0])) ? $parameters[0] : array(); + // ---------------------------------------------------- // Dynamically create a secure route URL. // ---------------------------------------------------- if (strpos($method, 'to_secure_') === 0) { - $parameters = (isset($parameters[0])) ? $parameters[0] : array(); return static::to_route(substr($method, 10), $parameters, true); } @@ -156,7 +157,6 @@ class URL { // ---------------------------------------------------- if (strpos($method, 'to_') === 0) { - $parameters = (isset($parameters[0])) ? $parameters[0] : array(); return static::to_route(substr($method, 3), $parameters); }