Merge pull request #1103 from pixelfed/frontend-ui-refactor

Update AP Helpers
This commit is contained in:
daniel 2019-04-01 18:33:08 -06:00 committed by GitHub
commit b1ae7fcb6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,6 +170,10 @@ class Helpers {
public static function fetchFromUrl($url)
{
$url = self::validateUrl($url);
if($url == false) {
return;
}
$res = Zttp::withHeaders(self::zttpUserAgent())->get($url);
$res = json_decode($res->body(), true, 8);
if(json_last_error() == JSON_ERROR_NONE) {