summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/feedmapper.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/feedmapper.php b/lib/feedmapper.php
index 6461b6bf7..a533691cb 100644
--- a/lib/feedmapper.php
+++ b/lib/feedmapper.php
@@ -59,7 +59,9 @@ class OC_News_FeedMapper {
public function findById($id){
$stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?');
$result = $stmt->execute(array($id));
- $row = $result->fetchRow();
+ if(!$row = $result->fetchRow())
+ return null;
+
$url = $row['url'];
$title = $row['title'];
$feed = new OC_News_Feed($url, $title, null, $id);