return empty array when nested route directory doesnt have route file.
This commit is contained in:
parent
e40faa1945
commit
f2363b1141
|
@ -54,7 +54,7 @@ private function load_nested_routes($uri)
|
||||||
{
|
{
|
||||||
if (is_dir($path = $this->path.implode('/', array_slice($segments, 0, $key + 1))))
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue