From 138648d71540e5b7acc6785364034e943666102f Mon Sep 17 00:00:00 2001 From: Mischa Spelt Date: Fri, 5 Jul 2019 23:55:37 +0200 Subject: [PATCH] Bug fix blog --- api/app/Http/Controllers/NewsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/app/Http/Controllers/NewsController.php b/api/app/Http/Controllers/NewsController.php index 2c83d33..947d12b 100644 --- a/api/app/Http/Controllers/NewsController.php +++ b/api/app/Http/Controllers/NewsController.php @@ -168,6 +168,10 @@ QUERY; $podcast = app('db')->select(PodcastController::$BASE_SQL . ' AND `podcast`.`id` = :podcastId', ['podcastId' => $blogItem->podcast_id]); $podcast = count($podcast) ? $podcast[0] : null; } + else + { + $podcast = null; + } $result[] = new \Model\NewsItem($blogItem, $pictures, $podcast); }