From bd67ba66a892ea63cd70c9a7fec72c7094183037 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 15b5d98131c..5f06f8dc2a8 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1120,7 +1120,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);