aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Service/Extractor.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-07 20:39:03 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-07 20:39:03 +0100
commit8af35ad932177e0363412a868afc128b406e3322 (patch)
tree8d517780d2a82d68ebd06aea2da2fc4c7c67b5bb /src/Wallabag/CoreBundle/Service/Extractor.php
parentd01db0c71dcf183f1676b6b06206456138cb7660 (diff)
parent9c0c88200635a979b9abdcba922e1d3904790636 (diff)
downloadwallabag-8af35ad932177e0363412a868afc128b406e3322.tar.gz
wallabag-8af35ad932177e0363412a868afc128b406e3322.tar.zst
wallabag-8af35ad932177e0363412a868afc128b406e3322.zip
Merge pull request #1066 from wallabag/v2-api-tests-entry
V2 api tests entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Service/Extractor.php')
-rw-r--r--src/Wallabag/CoreBundle/Service/Extractor.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Service/Extractor.php b/src/Wallabag/CoreBundle/Service/Extractor.php
index d38b0d76..e4ec96f6 100644
--- a/src/Wallabag/CoreBundle/Service/Extractor.php
+++ b/src/Wallabag/CoreBundle/Service/Extractor.php
@@ -10,7 +10,7 @@ final class Extractor
10 public static function extract($url) 10 public static function extract($url)
11 { 11 {
12 $pageContent = Extractor::getPageContent(new Url(base64_encode($url))); 12 $pageContent = Extractor::getPageContent(new Url(base64_encode($url)));
13 $title = ($pageContent['rss']['channel']['item']['title'] != '') ? $pageContent['rss']['channel']['item']['title'] : _('Untitled'); 13 $title = $pageContent['rss']['channel']['item']['title'] ?: 'Untitled';
14 $body = $pageContent['rss']['channel']['item']['description']; 14 $body = $pageContent['rss']['channel']['item']['description'];
15 15
16 $content = new Content(); 16 $content = new Content();
@@ -19,6 +19,7 @@ final class Extractor
19 19
20 return $content; 20 return $content;
21 } 21 }
22
22 /** 23 /**
23 * Get the content for a given URL (by a call to FullTextFeed) 24 * Get the content for a given URL (by a call to FullTextFeed)
24 * 25 *