mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
Reduce exception.
This commit is contained in:
parent
1e2737bc5a
commit
bda0b00b18
@ -122,8 +122,10 @@ class DocumentationManifest {
|
||||
|
||||
$key = (isset($details['Key'])) ? $details['Key'] : $details['Title'];
|
||||
|
||||
if(!is_dir($path)) {
|
||||
if($path && !is_dir($path)) {
|
||||
throw new Exception($path . ' is not a valid documentation directory');
|
||||
} else if(!$path) {
|
||||
return;
|
||||
}
|
||||
|
||||
$version = (isset($details['Version'])) ? $details['Version'] : '';
|
||||
|
@ -112,7 +112,10 @@ class RebuildLuceneDocsIndex extends BuildTask {
|
||||
$doc->boost = $boost;
|
||||
}
|
||||
}
|
||||
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
$index->addDocument($doc);
|
||||
|
||||
if(!$quiet) {
|
||||
if(Director::is_cli()) echo " * adding ". $page->getPath() ."\n";
|
||||
else echo "<li>adding ". $page->getPath() ."</li>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user