Note: Staged WordPress metadata was unavailable for this legacy route. The body is retained inside the native shell; verify every version, dependency and download before applying it.

We are seeing drastic increase in error reports from product pages, the following exception is printed on attempt to load product page:

Wrong format... missing 0
in lib/Zend/Currency.php(186): Zend_Locale_Format::toNumber('0.000000', Array)
or
PHP Fatal error:  Uncaught exception 'Mage_Eav_Model_Entity_Attribute_Exception' with message 'Unknown date format, neither date nor time in 'yyyy-MM-dd HH:mm:ss' found' in app/code/core/Mage/Core/Model/Config.php:1357

Cause

The error seems to be caused by CloudLinux bug in cPanel (ea-php or alt-php packages) in updates from April 27, 2020:
ALTPHP-912: Fix “Unknown date format, neither date nor time” for Magento
The bug is fixed in updated alt-php and ea-php packages and also can be fixed by switching from use of iconv library to mbstring in Zend Locale.

Solution

Ask your host to install the most recent updates for ea-php or alt-php with ALTPHP-912 bug fixed.
Alternatively, to switch from iconv library to mbstring you can create local override for Zend/Locale/Format.php and change all iconv_* with mb_* functions there:
  • check if local override for Zend/Locale/Format.php exists and create it if needed (skip this step otherwise):
    $ ls -la app/code/local/Zend/Locale/Format.php
    ls: cannot access app/code/local/Zend/Locale/Format.php: No such file or directory
    $ mkdir -p app/code/local/Zend/Locale
    $ cp -a lib/Zend/Locale/Format.php app/code/local/Zend/Locale/
    
  • edit app/code/local/Zend/Locale/Format.php replacing all iconv_ calls with mb_functions
  • clear compiled cache and Disable Magento Compiler
If it would not work due to some reason or you wish to have us handle it for you, please create a new ticket via our support form.

Note: We are seeing drastic increase in such error reports since April 27, 2020 after recent cPanel update. You are also may be interested in cache_dir “null” must be a directory error in backend


Comments

Archived discussion

  1. Nature's Cure-All
    hi I am too getting this error on my magento 1 website, how to fix this? i have changed file /lib/zend/locale/format.php and replaced all iconv_strpos with mb_strpos; but it did not resolved the issue.
    1. magentary
      What are your Magento & PHP versions?
      1. Nature's Cure-All
        My Magento version is 1.9.3.4 and PHP version is 5.6.40 please help urgently my website is still down.
        1. magentary

          replacing iconv_strpos with mb_strpos in lib/Zend/Locale/Format.php should help.

          Please make sure that you have no local overrides in app/code/local/Zend/Locale/Format.php and cleared compiler cache.

      2. Ilha Bike Store
        Hi , I have the same error on my magento web site , please how to fix this ? Thank you
  2. Nabin Rawat
    Please check it out it may help. I’ve edited the /lib/Zend/Locale/Format.php replacing all iconv_strpos with strpos and it works for now. or replaced it with mb_strpos. It worked on mine.