joomlatools-framework
joomlatools-framework copied to clipboard
utf8_en/decode deprecation
These two functions are deprecated on PHP 8.2 and going to be removed on PHP 9.
We need to replace these.
Solution
Encode
mb_convert_encoding($string, "UTF-8", mb_detect_encoding($string))
Decode
mb_convert_encoding($string, "ISO-8859-1", "UTF-8")
source: https://stackoverflow.com/questions/74865684/php-utf8-en-decode-deprecated-what-can-i-use
Implementation
Make use of https://github.com/joomlatools/joomlatools-framework/blob/master/code/libraries/joomlatools/library/legacy.php for re-defining the functions when removed.
Support tickets
- https://secure.helpscout.net/conversation/2691922527/17632/
- https://secure.helpscout.net/conversation/2754573615/18312/