From f2363b11419c8ac3d9e85fa6ec13fcfaac07e037 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 2 Aug 2011 21:26:29 -0500 Subject: [PATCH] return empty array when nested route directory doesnt have route file. --- system/routing/loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/routing/loader.php b/system/routing/loader.php index 1185ccdb..ed6dbd7d 100644 --- a/system/routing/loader.php +++ b/system/routing/loader.php @@ -54,7 +54,7 @@ class Loader { { if (is_dir($path = $this->path.implode('/', array_slice($segments, 0, $key + 1)))) { - return require $path.'/routes'.EXT; + return (file_exists($path = $path.'/routes'.EXT)) ? require $path : array(); } }