Fix empty argument cases for DOMParentNode methods#11768
Fix empty argument cases for DOMParentNode methods#11768ndossche wants to merge 1 commit intophp:PHP-8.1from
Conversation
|
@nielsdos just one unrelated question regarding dom. Should the Maybe it could be fixed to PHP_VERSION so it's more clear. |
|
@petk There's an open issue for that: #8038. DOM_API_VERSION reflects the implemented standard version. So it shouldn't be equal to PHP_VERSION. Also, since we don't fully implement the living standard yet, bumping it to the last's revision date is too optimistic. I'm not sure what to do with that and I don't know if people depend on its value... |
|
Ok, then let's bump it in PHP 9, I guess. :) Nobody relies on the DOM version anyway because it is constant for many PHP versions. |
|
Searching on GH yields indeed no results: https://github.com/search?q=DOM_API_VERSION+language%3APHP+&type=code |
|
Right, having the DOM_API_VERSION and extension version tied together is unfortunate... :/
No worries. In the future let's post our findings in that issue I linked above :) |
| PHP_METHOD(DOMCharacterData, after) | ||
| { | ||
| int argc; | ||
| int argc = 0; |
There was a problem hiding this comment.
Those all should be uint32_t in theory, but that's more a master branch thing.
| int argc = 0; | |
| uint32_t argc = 0; |
There was a problem hiding this comment.
Actually that's already done in master :D

They should be callable with empty arguments. It might seem useless but this can happen with empty fragments (as seen in the attached testcase).
This aligns the behaviour to spec.