mirror of
https://github.com/php/php-src.git
synced 2026-04-27 18:23:26 +02:00
c2a58ab07d
A number of error conditions in DOM can only occur if libxml2 runs out of memory, at least as far as I can see. In such cases we currently do a silent "return false", which violates the DOM spec, and which code is very unlikely to handle sensibly. Switch these to throw a DomException with INVALID_STATE_ERR type. This error type is chosen because we use for similar checks elsewhere, for example: https://github.com/php/php-src/blob/a733b1ada7895f6fa5e349755a878cae9189e3f5/ext/dom/documentfragment.c#L45-L48 This changes some of the more obvious cases I spotted, but there are probably more. Closes GH-7049.
50 KiB
50 KiB