diff options
author | Andreas Gohr <andi@splitbrain.org> | 2022-01-01 12:34:45 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2022-01-01 13:24:13 +0100 |
commit | bf8f8509c55822203064b5dd3e5cebdec0d54d7e (patch) | |
tree | 25c23df26b6536b0c5fd5767895d5de824fdcdcb /inc/HTTP/HTTPClient.php | |
parent | f7711f2b85e327b7a52627930dff9288aa2482cf (diff) | |
download | dokuwiki-bf8f8509c55822203064b5dd3e5cebdec0d54d7e.tar.gz dokuwiki-bf8f8509c55822203064b5dd3e5cebdec0d54d7e.zip |
guard against unset parameters
Many string function will throw a deprecation warning in PHP 8.1 when
null is passed. This adds a few guards in some of our methods (not all,
yet)
Diffstat (limited to 'inc/HTTP/HTTPClient.php')
-rw-r--r-- | inc/HTTP/HTTPClient.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/HTTP/HTTPClient.php b/inc/HTTP/HTTPClient.php index 7ba95a7b6..5c7491ee9 100644 --- a/inc/HTTP/HTTPClient.php +++ b/inc/HTTP/HTTPClient.php @@ -772,7 +772,7 @@ class HTTPClient { foreach($lines as $line){ @list($key, $val) = explode(':',$line,2); $key = trim($key); - $val = trim($val); + $val = trim($val ?? ''); $key = strtolower($key); if(!$key) continue; if(isset($headers[$key])){ |