From 7c96263ceefb809ac1c9831178825f58f8514910 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Thu, 6 Nov 2025 22:42:03 +0100 Subject: [PATCH] dom: Fix compile warning due to misplaced const cast --- ext/dom/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index e48cafbabe9..faf6e210e2d 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1234,7 +1234,7 @@ PHP_METHOD(DOMDocument, __construct) } if (encoding_len > 0) { - docp->encoding = (const xmlChar *) xmlStrdup((xmlChar *) encoding); + docp->encoding = xmlStrdup((const xmlChar *) encoding); } intern = Z_DOMOBJ_P(ZEND_THIS);