Make "HTTPRequest::fetchUrl" dynamic

This commit is contained in:
nupplaPhil 2020-03-04 22:20:27 +01:00 committed by Hypolite Petovan
parent fed6e3cde1
commit 40ff1d7fda
7 changed files with 12 additions and 19 deletions

View file

@ -15,7 +15,6 @@ use Friendica\Core\Hook;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\DI;
use Friendica\Network\HTTPRequest;
use Friendica\Util\Proxy as ProxyUtils;
function curweather_install()
@ -49,7 +48,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
}
try {
$res = new SimpleXMLElement(HTTPRequest::fetchUrl($url));
$res = new SimpleXMLElement(DI::httpRequest()->fetchUrl($url));
} catch (Exception $e) {
if (empty($_SESSION['curweather_notice_shown'])) {
info(DI::l10n()->t('Error fetching weather data. Error was: '.$e->getMessage()));