IntlDateFormatter php issue
ZC 1.5.8 (probably others too)
Due to changes of IntlDateFormatter in PHP 8.1.25 8.2.12
any store updating to those new releases of PHP will get a server 500 error, and logs like below.
Here it the github info on the change : https://github.com/php/php-src/issues/12561
What I don't know is what we have to change to fix it.
Sort term answer is drop down to PHP 8.0
Code:
[02-Nov-2023 10:05:18 America/New_York] Request URI: /manufactuername-m-1.html, IP address: 11.22.33.44
--> PHP Fatal error: Uncaught IntlException: datefmt_create: invalid locale: U_ILLEGAL_ARGUMENT_ERROR in /home/account/www.website.com/includes/classes/zcDate.php:87
Stack trace:
#0 /home/account/www.website.com/includes/classes/zcDate.php(87): IntlDateFormatter->__construct('C', 3, -1)
#1 /home/account/www.website.com/includes/classes/zcDate.php(39): zcDate->initializeConversionArrays()
#2 /home/account/www.website.com/includes/autoload_func.php(47): zcDate->__construct()
#3 /home/account/www.website.com/includes/application_top.php(237): require('/home/account...')
#4 /home/account/www.website.com/index.php(25): require('/home/account...')
#5 {main}
thrown in /home/account/www.website.com/includes/classes/zcDate.php on line 87.
Re: IntlDateFormatter php issue
Since I can't delete, see this thread for better info https://www.zen-cart.com/showthread....ARGUMENT_ERROR
Re: IntlDateFormatter php issue
The fix for this issue from Dr. Byte is as follows:
Zen Cart 1.5.8/1.5.8a users: Add this to the end of includes/configure.php and YOUR_ADMIN/includes/configure.php:
Code:
@setlocale(LC_TIME, ['en_US', 'en_US.UTF-8', 'en-US']);
This issue is handled in 2.0.0 without the requirement for these changes.