-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix empty argument cases for DOMParentNode methods #11768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -364,12 +364,12 @@ PHP_METHOD(DOMCharacterData, remove) | |||
|
|||
PHP_METHOD(DOMCharacterData, after) | |||
{ | |||
int argc; | |||
int argc = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.