From b6090c9427694191c387ac9dbca55da605d97d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20M=2E?= Date: Fri, 9 Aug 2024 22:21:27 +0200 Subject: [PATCH] Fix Passing null to parameter #1 ($string) of type string is deprecated --- src/BaseElement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaseElement.php b/src/BaseElement.php index d1d4235..165a51a 100644 --- a/src/BaseElement.php +++ b/src/BaseElement.php @@ -297,7 +297,7 @@ public function prependChild($children, $mapper = null) */ public function text($text) { - return $this->html(htmlentities($text, ENT_QUOTES, 'UTF-8', false)); + return $this->html(htmlentities($text ?? '', ENT_QUOTES, 'UTF-8', false)); } /**