mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-18 12:50:56 +00:00
Fix posts discovery.
For PHP before 5.5, the bridge is not working. It returns the following error: "Can't use method return value in write context". See the following message for explanations: http://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context/4328049#4328049
This commit is contained in:
parent
f5690edc3c
commit
e7c00914dd
@ -25,7 +25,8 @@ class WordpressBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
$html = file_get_html($this->url) or $this->returnError("Could not request {$this->url}.", 404);
|
$html = file_get_html($this->url) or $this->returnError("Could not request {$this->url}.", 404);
|
||||||
|
|
||||||
if(!empty($html->find('.post')) ) {
|
$posts = $html->find('.post');
|
||||||
|
if(!empty($posts) ) {
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach ($html->find('.post') as $article) {
|
foreach ($html->find('.post') as $article) {
|
||||||
if($i < 3) {
|
if($i < 3) {
|
||||||
|
Loading…
Reference in New Issue
Block a user