1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-12 08:04:05 +02:00

Flextype Core: Entries - method fetch() - improvements.

This commit is contained in:
Awilum
2019-02-13 00:12:50 +03:00
parent 4c29057afc
commit 08cc07817c

View File

@@ -293,7 +293,15 @@ class Entries
$entry_file = PATH['entries'] . '/' . $entry . '/entry.html';
if (Filesystem::has($entry_file)) {
return YamlParser::decode(Filesystem::read($entry_file));
if ($entry = Filesystem::read($entry_file)) {
if ($entry_decoded = YamlParser::decode($entry)) {
return $entry_decoded;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}