Prestashop version: 1.7.4.4
PHP Version: 7.2.12
I got 3 advices in PHP logs:
For the third one, It seems now you are supposed to use INTL_IDNA_VARIANT_UTS46 instead. However, PHP seems to be still using INTL_IDNA_VARIANT_2003 as the default if none is specified. So, to avoid this one, you have to explicitly call with INTL_IDNA_VARIANT_UTS46 as parameter.
Something like:
return $address[0].'@'.idn_to_ascii($address[1],0,INTL_IDNA_VARIANT_UTS46);
PHP docs:
1/2. http://php.net/manual/en/function.each.php
Hi @rblaurin,
I did not manage to reproduce the issue with PS1.7.4.4 & PHP7.2.
I just have some issue related & they are fixed in the next release 1.7.5.0 with this PR: https://github.com/PrestaShop/PrestaShop/pull/9409
Could you please provide me the exact steps to reproduce your issue.
Thanks!
Hi,
I manage to reproduce the deprecated warning about each.
For INTL, latest version of PrestaShop require the extension php-intl.
We will add a fix as soon as possible to remove the each function :)
Regards,
Hi,
I manage to reproduce the deprecated warning about each.
For INTL, latest version of PrestaShop require the extension php-intl.
We will add a fix as soon as possible to remove the each function :)Regards,
Thank you!
I have already php-intl extension installed. It seems the problem here is just the deprecation of INTL_IDNA_VARIANT_2003, that should be changed to INTL_IDNA_VARIANT_UTS46.
Although INTL_IDNA_VARIANT_2003 is deprecated in php 7.2, the function idn_to_ascii still uses it as default and it seems the only way to avoid the warning is calling the function using explicitly the parameter INTL_IDNA_VARIANT_UTS46.
According to php changelogs, the function idn_to_ascii() was changed for PHP 7.4.0 (default will be INTL_IDNA_VARIANT_UTS46), but not in 7.2.
Hello, I changed the deprecated functions.
However I was not able to test all the changes as I'm not sure where exactly they are used, and I don't manage to display deprecation notices on my environment.
I was able to check the modification for cart update, but not the three others.
@jolelievre Maybe you would like this list https://github.com/PrestaShop/PrestaShop/issues/11680
Most helpful comment
Hi,
I manage to reproduce the deprecated warning about each.
For INTL, latest version of PrestaShop require the extension php-intl.
We will add a fix as soon as possible to remove the each function :)
Regards,