fix: throw an error if the local feed file is not found.

pull/1972/head
iglocska 2017-02-21 09:11:20 +01:00
parent 2f7ea4ca65
commit b24be9b894
1 changed files with 3 additions and 0 deletions

View File

@ -122,6 +122,9 @@ class Feed extends AppModel {
if (isset($feed['Feed']['input_source']) && $feed['Feed']['input_source'] == 'local') {
if (file_exists($feed['Feed']['url'] . '/manifest.json')) {
$data = file_get_contents($feed['Feed']['url'] . '/manifest.json');
if (empty($data)) return false;
} else {
throw new NotFoundException('Invalid file.');
}
} else {
$uri = $feed['Feed']['url'] . '/manifest.json';