From ea4586d8b34cb96daaca7067760828d90d043505 Mon Sep 17 00:00:00 2001 From: Teromene Date: Tue, 2 Aug 2016 14:11:28 +0200 Subject: [PATCH] Fix CoinDeskBridge --- bridges/CoinDeskBridge.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bridges/CoinDeskBridge.php b/bridges/CoinDeskBridge.php index 2ca88d1a..4f9e8659 100644 --- a/bridges/CoinDeskBridge.php +++ b/bridges/CoinDeskBridge.php @@ -1,5 +1,5 @@ file_get_html($url); - $text = $html2->find('div.single-content', 0)->innertext; - $text = strip_tags($text, '

'); - return $text; + //FIXME: We need to change the $this->file_get_html to a static + $html2 = file_get_html($url); + $text = $html2->find('div.single-content', 0)->innertext; + $text = strip_tags($text, '

'); + return $text; } - $html = $this->file_get_html('http://www.coindesk.com/feed/atom/') or $this->returnError('Could not request CoinDesk.', 404); + + $html = $this->file_get_html('http://www.coindesk.com/feed/atom/') or $this->returnError('Could not request CoinDesk.', 404); $limit = 0; foreach($html->find('entry') as $element) {