Update GithubTrendingBridge.php

This commit is contained in:
Kirill Kotikov 2020-03-21 05:07:38 +03:00 committed by GitHub
parent 7b73f3217f
commit ec7ef8f502
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -596,7 +596,6 @@ class GithubTrendingBridge extends BridgeAbstract {
);
public function collectData(){
$params = array('since' => urlencode($this->getInput('date_range')));
$url = self::URI . '/' . $this->getInput('language') . '?' . http_build_query($params);
@ -604,7 +603,7 @@ class GithubTrendingBridge extends BridgeAbstract {
$html = getSimpleHTMLDOM($url)
or returnServerError('Error while downloading the website content');
$this->items = [];
$this->items = array();
foreach($html->find('.Box-row') as $element) {
$item = array();