From: Claus-Justus Heine Date: Tue, 15 Feb 2022 17:26:01 +0000 (+0100) Subject: Fix one PHP 8 undefined array key "error" X-Git-Tag: plcapi-7.1-0~3^2~5^2~1 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=e9ccb65ba9fa0b6ec69d98749f289cf806ff330e Fix one PHP 8 undefined array key "error" --- diff --git a/src/Helper/Http.php b/src/Helper/Http.php index d12f456..fa03d5a 100644 --- a/src/Helper/Http.php +++ b/src/Helper/Http.php @@ -183,7 +183,7 @@ class Http foreach ($cookie as $pos => $val) { $val = explode('=', $val, 2); $tag = trim($val[0]); - $val = trim(@$val[1]); + $val = isset($val[1] ? trim($val[1]) : ''; /// @todo with version 1 cookies, we should strip leading and trailing " chars if ($pos == 0) { $cookiename = $tag;