Browse Source

make the bridge compatible with wordpress with no static URL (#469)

Astyan-42 7 years ago
parent
commit
a1764a9fe2
1 changed files with 5 additions and 2 deletions
  1. 5 2
      bridges/WordPressBridge.php

+ 5 - 2
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');
+		}
 
 	}
 }