-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix removed "php_strtolower" for PHP 8.4 #690
base: develop
Are you sure you want to change the base?
Conversation
@@ -610,7 +610,7 @@ static zval *php_imagick_read_property(zend_object *object, zend_string *member, | |||
if (format) { | |||
retval = rv; | |||
ZVAL_STRING(retval, format); | |||
php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); | |||
zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); |
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 bet it should be used conditionally depending on PHP version
zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); | |
#if PHP_VERSION_ID < 80400 | |
php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); | |
#else | |
zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); | |
#endif |
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.
Other 2 places also needs this
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.
Why - it is present at least since PHP 5.4 - https://github.com/php/php-src/blob/PHP-5.4.45/Zend/zend_operators.h#L332
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.
Sorry, I didn't check php-src, looks like the function exists, so probably it's not required
@Danack can we get this merged? |
I checked the patch and it is working. One thing, though: I still use the same code to update PHP 5.3 (yeah, I know), so I had a #ifdef #else #endif construction anyway. |
Based on https://github.com/Imagick/imagick/blob/3.7.0/package.xml#L8 PHP 5.3 (and lower) is no longer supported. |
fixes #689
see https://github.com/php/php-src/pull/15391/files