[php-src] Issue #9194: can `$dom->createElement` return `false`
| From: | staabm | Date: | Fri, 29 Jul 2022 16:07:42 +0000 |
| Subject: | [php-src] Issue #9194: can `$dom->createElement` return `false` | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242069@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9194
Author: staabm
### Description
the docs suggest createElement() might return false.
https://www.php.net/manual/en/domdocument.createelement.php
looking at the source makes me think there is only a single case which might return false
https://github.com/php/php-src/blob/c2a58ab07db1d004daa65646315d9bf63d208827/ext/dom/document.c#L531
I tried triggering this line, but then I got a exception, see https://3v4l.org/L35Q6
I am wondering whether the return false is no longer possible and the signature should be updated?
### PHP Version
8.1.x
### Operating System
_No response_