aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/HTTP/HTTPClient.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2022-01-01 12:34:45 +0100
committerAndreas Gohr <andi@splitbrain.org>2022-01-01 13:24:13 +0100
commitbf8f8509c55822203064b5dd3e5cebdec0d54d7e (patch)
tree25c23df26b6536b0c5fd5767895d5de824fdcdcb /inc/HTTP/HTTPClient.php
parentf7711f2b85e327b7a52627930dff9288aa2482cf (diff)
downloaddokuwiki-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.php2
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])){