summaryrefslogtreecommitdiffstats
path: root/lib/Fetcher
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fetcher')
-rw-r--r--lib/Fetcher/Client/FeedIoClient.php2
-rwxr-xr-xlib/Fetcher/FeedFetcher.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Fetcher/Client/FeedIoClient.php b/lib/Fetcher/Client/FeedIoClient.php
index 3a1427e84..ac1f62a1f 100644
--- a/lib/Fetcher/Client/FeedIoClient.php
+++ b/lib/Fetcher/Client/FeedIoClient.php
@@ -61,7 +61,7 @@ class FeedIoClient implements ClientInterface
return new Response($psrResponse, $duration);
} catch (BadResponseException $e) {
- switch ((int) $e->getResponse()->getStatusCode()) {
+ switch ($e->getResponse()->getStatusCode()) {
case 404:
throw new NotFoundException($e->getMessage());
default:
diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php
index 01cb20853..c25f4ddb9 100755
--- a/lib/Fetcher/FeedFetcher.php
+++ b/lib/Fetcher/FeedFetcher.php
@@ -112,7 +112,7 @@ class FeedFetcher implements IFeedFetcher
?string $password
): array {
$url2 = new Net_URL2($url);
- if (!empty($user) && !empty(trim($user))) {
+ if (!is_null($user) && trim($user) !== '') {
$url2->setUserinfo(urlencode($user), urlencode($password));
}
$url = $url2->getNormalizedURL();