From 4053fb4c52b8a8c1b180d80ab5c64f6789875656 Mon Sep 17 00:00:00 2001
From: qodelicious <162776175+qodelicious@users.noreply.github.com>
Date: Mon, 19 Oct 2026 00:13:21 +0000
Subject: [PATCH] DOMDocument::loadXML(): document the ValueError for an empty
string
Fixes #2245
---
reference/dom/domdocument/loadxml.xml | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/reference/dom/domdocument/loadxml.xml b/reference/dom/domdocument/loadxml.xml
index 5e982a4b794c..6e9fe86d1a7f 100644
--- a/reference/dom/domdocument/loadxml.xml
+++ b/reference/dom/domdocument/loadxml.xml
@@ -51,11 +51,10 @@
&reftitle.errors;
-
- If an empty string is passed as the source,
- a warning will be generated. This warning is not generated by libxml
- and cannot be handled using libxml's error handling functions.
-
+
+ Throws a ValueError if source
+ is an empty string.
+
&reftitle.changelog;
@@ -74,6 +73,14 @@
This function now has a tentative bool return type.
+
+ 8.0.0
+
+ Passing an empty string as source now throws a
+ ValueError; previously, an E_WARNING
+ was raised and &false; was returned.
+
+
8.0.0