From 067c942ecdbea4aa7ab919be33c6c6c1b06d3bdf Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Fri, 26 Feb 2016 10:19:38 -0400 Subject: [PATCH] BUGFIX: Fixed file_get_contents warning when viewing a folder that has no index.md --- code/models/DocumentationPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/models/DocumentationPage.php b/code/models/DocumentationPage.php index e481da7..6290e97 100755 --- a/code/models/DocumentationPage.php +++ b/code/models/DocumentationPage.php @@ -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;