summaryrefslogtreecommitdiff
path: root/classes/urlhelper.php
diff options
context:
space:
mode:
authorltGuillaume <[email protected]>2021-03-06 22:31:55 +0300
committerltGuillaume <[email protected]>2021-03-06 20:33:23 +0100
commit825e362f0efce6c2e6a9b347b70fd97ef09e59f1 (patch)
treeeb5c9e95687cdcd423fbd97a299101ec97288753 /classes/urlhelper.php
parent7b0b5b55c7a7e0f5e5f63083a5131ea85109bbec (diff)
Fix "array offset on value of type null" for $error and $old_error
I tried applying to only $error and only $old_error, but both appear to be needed. Log entries: E_NOTICE (8) classes/urlhelper.php:464 Trying to access array offset on value of type null 1. classes/urlhelper.php(464): ttrss_error_handler(8, Trying to access array offset on value of type null, classes/urlhelper.php, 464, [) 2. classes/rssutils.php(464): fetch([{"url":"https://some.url.rss","login":"","pass":"","timeout":15,"last_modified":"Sat, 31 Aug 2019 15:22:31 GMT"}) 3. update.php(235): update_rss_feed(732, 1)
Diffstat (limited to 'classes/urlhelper.php')
-rw-r--r--classes/urlhelper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/urlhelper.php b/classes/urlhelper.php
index 389298078..55d5d1e6a 100644
--- a/classes/urlhelper.php
+++ b/classes/urlhelper.php
@@ -461,7 +461,7 @@ class UrlHelper {
if (self::$fetch_last_error_code != 200) {
$error = error_get_last();
- if ($error['message'] != $old_error['message']) {
+ if (($error['message'] ?? '') != ($old_error['message'] ?? '')) {
self::$fetch_last_error .= "; " . $error["message"];
}