Merge pull request #103 from webbuilders-group/no-index-warn-fix

BUGFIX: Fixed file_get_contents warning when viewing a folder that has no index.md
This commit is contained in:
Daniel Hensby 2016-02-27 10:16:54 +00:00
commit 941377a180

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;