Merge pull request #53 from aledeg/wordpress
[WordpressBridge] Fix posts discovery for PHP 5.5-
This commit is contained in:
commit
3c363da883
1 changed files with 5 additions and 4 deletions
|
@ -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 a new issue