BUGFIX: Fixed file_get_contents warning when viewing a folder that has no index.md

This commit is contained in:
UndefinedOffset 2016-02-26 10:19:38 -04:00
parent 8af903915a
commit 067c942ecd

View File

@ -151,7 +151,7 @@ class DocumentationPage extends ViewableData
public function getMarkdown($removeMetaData = false)
{
try {
if ($md = file_get_contents($this->getPath())) {
if (is_file($this->getPath()) && $md = file_get_contents($this->getPath())) {
$this->populateMetaDataFromText($md, $removeMetaData);
return $md;