diff --git a/code/DocumentationService.php b/code/DocumentationService.php index f9a7b24..be119d1 100755 --- a/code/DocumentationService.php +++ b/code/DocumentationService.php @@ -330,7 +330,7 @@ class DocumentationService { * @return string */ private static function find_page_recursive($base, $goal) { - $handle = opendir($base); + $handle = (is_dir($base)) ? opendir($base) : false; $name = self::trim_extension_off(strtolower(array_shift($goal))); if(!$name || $name == '/') $name = 'index'; @@ -377,10 +377,10 @@ class DocumentationService { } } } + + closedir($handle); } - closedir($handle); - return false; }