From b6f9df4ad399bbc34933b68b1c7f33fb96980f7e Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 15 Mar 2024 22:02:11 +0100 Subject: [PATCH] Passing null to DOMDocument() is deprecated in PHP8.1 at the latest --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4a6e3a42f01..1291d954e2a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7646,7 +7646,7 @@ function dol_string_onlythesehtmlattributes($stringtoclean, $allowed_attributes $stringtoclean = ''.$stringtoclean.''; // Warning: loadHTML does not support HTML5 on old libxml versions. - $dom = new DOMDocument(null, 'UTF-8'); + $dom = new DOMDocument('', 'UTF-8'); $dom->loadHTML($stringtoclean, LIBXML_ERR_NONE | LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NONET | LIBXML_NOWARNING | LIBXML_NOXMLDECL); if ($dom instanceof DOMDocument) {