From c9de1b3b01f50af2cd0c37b3d99ec5eef02f4987 Mon Sep 17 00:00:00 2001 From: Ryan Lieu Date: Mon, 15 May 2023 18:30:44 +0800 Subject: [PATCH] fix php 8.1 Deprecated: htmlspecialchars(): Passing null to parameter #1 (#1570) * Fix multiple calls returning the same object * fix: strtolower() passing null to parameter #1 ($string) of type string is deprecated * fix: php 8.1 Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated --- var/Typecho/Widget/Helper/Form/Element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/Typecho/Widget/Helper/Form/Element.php b/var/Typecho/Widget/Helper/Form/Element.php index 7389ebdd..984864c5 100644 --- a/var/Typecho/Widget/Helper/Form/Element.php +++ b/var/Typecho/Widget/Helper/Form/Element.php @@ -217,7 +217,7 @@ abstract class Element extends Layout public function value($value): Element { $this->value = $value; - $this->inputValue($value); + $this->inputValue($value ?? ''); return $this; }