Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mvorisek
Copy link

@mvorisek mvorisek commented Sep 25, 2024

@@ -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));
Copy link
Contributor

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

Suggested change
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

Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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

@mvorisek
Copy link
Author

@Danack can we get this merged?

@Jan-E
Copy link
Contributor

Jan-E commented Oct 12, 2024

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.

@mvorisek
Copy link
Author

mvorisek commented Oct 12, 2024

Based on https://github.com/Imagick/imagick/blob/3.7.0/package.xml#L8 PHP 5.3 (and lower) is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants