-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FPM: refactor fpm_php_get_string_from_table() to better match usage #11051
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
FPM: refactor fpm_php_get_string_from_table() to better match usage #11051
Conversation
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.
Looks reasonable - just some minor comments
sapi/fpm/fpm/fpm_php.c
Outdated
if (!data || Z_TYPE_P(data) != IS_ARRAY) { | ||
return NULL; | ||
} | ||
ZEND_ASSERT(data && Z_TYPE_P(data) == IS_ARRAY); |
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.
I would rather leave this as a check as it's kind of external things from FPM PoV...
Pass in length of the key to improve the existance of the key check
3799dfa
to
3360378
Compare
Addressed the review comments, only other change was to move the declaration of the |
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.
All looks good to me.
Pass in length of the key to improve the existance of the key check.
Feel free to close if you don't agree @bukka, but the returned
char*
is never used and passing in the length of the key allows performing the quick check of "do both string lengths match".