From dd676d76cfcea748fb62c5713cc0879d3c538afd Mon Sep 17 00:00:00 2001 From: Mike Little Date: Mon, 18 May 2026 13:43:33 +0100 Subject: [PATCH] Fix PHP 8.4+ implicit-nullable deprecation in U2F Error constructor Add explicit ?\Exception type to the $previous parameter. Implicit nullable parameters (Type $x = null) are deprecated as of PHP 8.4 and emit a deprecation notice on every class load under PHP 8.5. Matches the existing @param \Exception|null docblock. --- includes/Yubico/U2F.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Yubico/U2F.php b/includes/Yubico/U2F.php index e819bbc1..bbb6e9a0 100644 --- a/includes/Yubico/U2F.php +++ b/includes/Yubico/U2F.php @@ -501,7 +501,7 @@ class Error extends \Exception * @param int $code * @param \Exception|null $previous */ - public function __construct($message, $code, \Exception $previous = null) { + public function __construct($message, $code, ?\Exception $previous = null) { parent::__construct($message, $code, $previous); } }