ext/gettext: update arguments handling.#13582
Closed
devnexen wants to merge 3 commits intophp:masterfrom
Closed
Conversation
60f490b to
2e69adf
Compare
Member
Author
|
ping :) |
kocsismate
reviewed
Apr 28, 2024
ext/gettext/gettext.c
Outdated
| PHP_FUNCTION(textdomain) | ||
| { | ||
| char *domain_name = NULL, *retval; | ||
| char *retval = NULL, *domain_name = NULL; |
Member
There was a problem hiding this comment.
what's the purpose of this order change? I mean I don't mind it, I was just curious it's accidental or not.
kocsismate
reviewed
Apr 28, 2024
Girgias
approved these changes
Apr 28, 2024
Member
Girgias
left a comment
There was a problem hiding this comment.
Other than @kocsismate's comment and my remark LGTM
ext/gettext/gettext.c
Outdated
Comment on lines
89
to
93
| if (domain != NULL && ZSTR_LEN(domain) != 0 && !zend_string_equals_literal(domain, "0")) { | ||
| PHP_GETTEXT_DOMAIN_LENGTH_CHECK(1, ZSTR_LEN(domain)) |
Member
There was a problem hiding this comment.
Should we warn about empty strings and the string "0" here? As this looks like an outdated API? (also those values are not actually documented to not affect the domain)
Member
Author
There was a problem hiding this comment.
I realise empty string is already checked and throws.
Member
|
Please fix the conflict :) |
using zend_string whenever relevant too.
2e69adf to
b0aaf4c
Compare
Girgias
approved these changes
Apr 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
using zend_string whenever relevant too.