mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
BUGFIX: Fixed file_get_contents warning when viewing a folder that has no index.md
This commit is contained in:
parent
8af903915a
commit
067c942ecd
@ -151,7 +151,7 @@ class DocumentationPage extends ViewableData
|
|||||||
public function getMarkdown($removeMetaData = false)
|
public function getMarkdown($removeMetaData = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($md = file_get_contents($this->getPath())) {
|
if (is_file($this->getPath()) && $md = file_get_contents($this->getPath())) {
|
||||||
$this->populateMetaDataFromText($md, $removeMetaData);
|
$this->populateMetaDataFromText($md, $removeMetaData);
|
||||||
|
|
||||||
return $md;
|
return $md;
|
||||||
|
Loading…
Reference in New Issue
Block a user