Skip to content

Commit

Permalink
use zend_str_tolower instead of php_strtolower
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Sep 25, 2024
1 parent 03ecc34 commit 56c80d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ It can deal with rfc822 and rfc2045 (MIME) compliant messages.
</stability>
<license uri="https://www.php.net/license/3_01.txt" filesource="LICENSE">PHP-3.01</license>
<notes>
-
- PHP 8.4 compatibility
</notes>
<contents>
<dir name="/">
Expand Down
4 changes: 4 additions & 0 deletions php_mailparse_rfc822.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,11 @@ PHP_MAILPARSE_API char *php_rfc822_recombine_tokens(php_rfc822_tokenized_t *toks
ret[len] = 0;

if (flags & PHP_RFC822_RECOMBINE_STRTOLOWER)
#if PHP_VERSION_ID < 80400
php_strtolower(ret, len);
#else
zend_str_tolower(ret, len);
#endif

return ret;
}
Expand Down

2 comments on commit 56c80d2

@mlocati
Copy link

@mlocati mlocati commented on 56c80d2 Oct 4, 2024

Choose a reason for hiding this comment

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

@remicollet
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the catch

BTW, build should use the php_mailparse_rfc822.c, not the php_mailparse_rfc822.re (only when needed), which explain build passes for me on all the matrix (7.3 to 8.4)

Please sign in to comment.