amend logic flow to fix phpstan warning in previous

This commit is contained in:
Andrew Dolgov 2022-08-15 07:59:24 +03:00
parent 3b7174788d
commit 7d77edd1fb
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 11 additions and 11 deletions

View File

@ -587,20 +587,20 @@ class UrlHelper {
return false; return false;
} }
if (!$data) { if ($data) {
$is_gzipped = RSSUtils::is_gzipped($data);
if ($is_gzipped) {
$tmp = @gzdecode($data);
if ($tmp) $data = $tmp;
}
return $data;
} else {
self::$fetch_last_error = 'Successful response, but no content was received.'; self::$fetch_last_error = 'Successful response, but no content was received.';
return false; return false;
} }
$is_gzipped = RSSUtils::is_gzipped($data);
if ($is_gzipped && $data) {
$tmp = @gzdecode($data);
if ($tmp) $data = $tmp;
}
return $data;
} }
} }