[doc-en] master: DOMDocument::loadXML(): document the ValueError for an empty string (#5968)
| From: | qodelicious via GitHub | Date: | Mon, 19 Oct 2026 07:34:50 +0000 |
| Subject: | [doc-en] master: DOMDocument::loadXML(): document the ValueError for an empty string (#5968) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23850@lists.php.net to get a copy of this message | ||
Author: qodelicious (qodelicious)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-19T09:34:47+02:00
Commit: https://github.com/php/doc-en/commit/587b7ec5ece08cb9feba0475d23fdfb28754b701
Raw diff: https://github.com/php/doc-en/commit/587b7ec5ece08cb9feba0475d23fdfb28754b701.diff
DOMDocument::loadXML(): document the ValueError for an empty string (#5968)
Fixes #2245
Changed paths:
M reference/dom/domdocument/loadxml.xml
Diff:
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 @@
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
- <para>
- If an empty string is passed as the <parameter>source</parameter>,
- a warning will be generated. This warning is not generated by libxml
- and cannot be handled using libxml's error handling functions.
- </para>
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>source</parameter>
+ is an empty string.
+ </simpara>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
@@ -74,6 +73,14 @@
This function now has a tentative <type>bool</type> return type.
</entry>
</row>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Passing an empty string as <parameter>source</parameter> now throws a
+ <exceptionname>ValueError</exceptionname>; previously, an
<constant>E_WARNING</constant>
+ was raised and &false; was returned.
+ </entry>
+ </row>
<row>
<entry>8.0.0</entry>
<entry>