mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
BUGFIX: check for valid directory before opening
This commit is contained in:
parent
34d46b7a5b
commit
a87094fb16
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user