BUGFIX: check for valid directory before opening

This commit is contained in:
Will Rossiter 2012-04-08 21:27:53 +12:00
parent 34d46b7a5b
commit a87094fb16

View File

@ -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;
}