From a1764a9fe2c8eb047366caa84ee81fbdc97e6b72 Mon Sep 17 00:00:00 2001 From: Astyan-42 Date: Tue, 7 Feb 2017 11:24:18 +0100 Subject: [PATCH] make the bridge compatible with wordpress with no static URL (#469) --- bridges/WordPressBridge.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bridges/WordPressBridge.php b/bridges/WordPressBridge.php index 01af8d06..ce2bda41 100644 --- a/bridges/WordPressBridge.php +++ b/bridges/WordPressBridge.php @@ -66,8 +66,11 @@ class WordPressBridge extends FeedExpander { // just in case someone find a way to access local files by playing with the url returnClientError('The url parameter must either refer to http or https protocol.'); } - - $this->collectExpandableDatas($this->getURI().'/feed/atom/'); + try{ + $this->collectExpandableDatas($this->getURI().'/feed/atom/'); + }catch (HttpException $e){ + $this->collectExpandableDatas($this->getURI().'/?feed=atom'); + } } }