-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Is this a support request?
No
Describe the bug
Functions utf8_encode and utf8_decode were deprecated in PHP 8.2.
This SDK uses utf8_encode in one of it's functions -
| $cmd = base64_encode(iconv("UTF-8", "UTF-16LE", utf8_encode($args))); |
I suggest replacing iconv("UTF-8", "UTF-16LE", utf8_encode($args)) with mb_convert_encoding($args, 'UTF-16LE', 'ISO-8859-1')
To reproduce
Make sure, that error_reporting is set to E_ALL in php.ini and call CurlEventPublisher::publish() function
Expected behavior
No warnings and exceptions are produced
Logs
You will get exception Function utf8_encode() is deprecated depending on your php configuration and logs behavior
SDK version
v6.0.2
Language version, developer tools
PHP 8.3
OS/platform
Any
Additional context
This is preventing ticket, we don't use events sending and are not affected by that deprecation