JUN 16 2021

Uncaught Error: [] operator not supported for strings in app/code/local/Codazon/Themeframework/Model/System/Config/Source/Categoriestree.php

The following uncaught fatal error is thrown after upgrade to PHP7.x Magento 1.x Codazon theme: Fatal error: Uncaught Error: [] operator not supported for strings in app/code/local/Codazon/Themeframework/Model/System/Config/Source/Categoriestree.php:28 Full stack strace is Cause $_categoriesTree is initially defined as string and array is assigned later: This is not allowed in PHP7. Solution The following patch against app/code/local/Codazon/Themeframework/Model/System/Config/Source/Categoriestree.php should help:
MAR 31 2021

PHP Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘ in app/code/core/Mage/Core/Model/Cookie.php on line 183

The following fatal error logged after upgrade to OpenMage with PHP5.6: PHP Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘ in app/code/core/Mage/Core/Model/Cookie.php on line 183 Errors parsing app/code/core/Mage/Core/Model/Cookie.php Cause The cause is PHP7 type declaration in getSameSite() function added in commit 26b9eee1275b882dac0a84adcf8e22ca643afb61 merged into 1.9.4x tree in December 2020 and included in v19.4.10 release: Type declaration is not supported in older PHP versions. Solution Switch your PHP version to PHP 7.3+ (PHP7.0 is… Read the rest
MAR 31 2021

OpenMage :: unserialize() expects exactly 1 parameter, 2 given in app/code/core/Mage/Core/Model/Cache.php on line 503

The following exception is printed after upgrade to OpenMage: Warning: unserialize() expects exactly 1 parameter, 2 given in app/code/core/Mage/Core/Model/Cache.php on line 503 #0 [internal function]: mageCoreErrorHandler(2, ‘unserialize() e…’, ‘app/co…’, 503, Array) #1 app/code/core/Mage/Core/Model/Cache.php(503): unserialize(‘a:8:{s:10:”bloc…’, Array) #2 app/code/core/Mage/Core/Model/Cache.php(537): Mage_Core_Model_Cache->_initOptions() #3 app/code/core/Mage/Core/Model/App.php(1240): Mage_Core_Model_Cache->canUse(‘config’) #4 app/code/core/Mage/Core/Model/Config.php(425): Mage_Core_Model_App->useCache(‘config’) #5 app/code/core/Mage/Core/Model/Config.php(305): Mage_Core_Model_Config->_canUseCacheForInit() #6 app/code/core/Mage/Core/Model/App.php(440): Mage_Core_Model_Config->loadModulesCache() #7 app/code/core/Mage/Core/Model/App.php(370): Mage_Core_Model_App->_initModules() #8 app/Mage.php(731): Mage_Core_Model_App->run(Array) #9 index.php(78): Mage::run(”, ‘store’) #10 {main} Other similar errors may be thrown from app/code/core/Mage/Core/Model/Store.php or app/code/core/Mage/Core/Model/Translate.php: Warning: unserialize() expects… Read the rest
MAY 03 2020

[M1] Uncaught DivisionByZeroError: Modulo by zero in downloader/Maged/BruteForce/Validator.php line 59


1 comments

The following fatal PHP error is thrown in PHP 7.x on attempt to login to Magento Connect Manager / Downloader: PHP Fatal error: Uncaught DivisionByZeroError: Modulo by zero in downloader/Maged/BruteForce/Validator.php:59 Cause Modulo by zero is used on line 59 of downloader/Maged/BruteForce/Validator.php when $configAttemptsCount is 0: Solution Add a check for non-zero $configAttemptsCount:
JAN 26 2020

Fatal error: Cannot redeclare Mage_Adminhtml_Model_LayoutUpdate_Validator::$_validator in app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php on line 80

Editing any CMS page in Magento 1.7.0.2 results in a blank page or the following fatal error is shown after hitting Save button at CMS > Pages > Home or any other CMS page: Fatal error: Cannot redeclare Mage_Adminhtml_Model_LayoutUpdate_Validator::$_validator in app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php on line 80 It simply does not allow to edit any CMS page with custom XML layouts. Cause The was a bug in previous version of SUPEE-11219 where $_validator was defined twice. Solution Rollback… Read the rest
MAY 03 2020

Uncaught Error: Class Crypt_Rijndael not found in app/code/local/Ebizmarts/SagePaySuite/Model/SagePayForm.php

Magento Checkout page is blank on payment with SagePay after Magento update or PHP compatibility patch installation. The following PHP error logged: Fatal error: Uncaught Error: Class Crypt_Rijndael not found in app/code/local/Ebizmarts/SagePaySuite/Model/SagePayForm.php Cause Old versions of Ebizmarts/SagePaySuite extension (prior to 4.2.10) have direct calls to Crypt_Rijndael() class and are incompatible with PHP7.2 support. This class is replaced in Magento updates with PHP7.2 support/patch: lib/phpseclib/Crypt/Rijndael.php file is replaced with newer Rijndael implementation. Solution Update Ebizmarts/SagePaySuite extension… Read the rest
MAY 03 2020

PHP Fatal error: Uncaught Error: [] operator not supported for strings in app/code/core/Mage/Usa/sql/usa_setup/upgrade-1.6.0.1-1.6.0.2.php:93

On Magento 1.x upgrade the following error message is thrown: PHP Fatal error: Uncaught Error: [] operator not supported for strings in app/code/core/Mage/Usa/sql/usa_setup/upgrade-1.6.0.1-1.6.0.2.php:93 Stack trace: #0 app/code/core/Mage/Core/Model/Resource/Setup.php(624): include() #1 app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(‘upgrade’, ‘1.6.0.1’, ‘1.6.0.3’) #2 app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(‘1.6.0.1′, ‘1.6.0.3’) #3 app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates() #4 app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates() #5 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules() #6 app/Mage.php(686): Mage_Core_Model_App->run(Array) #7 index.php(83): Mage::run(”, ‘store’) #8 {main} thrown in app/code/core/Mage/Usa/sql/usa_setup/upgrade-1.6.0.1-1.6.0.2.php on line 93 Cause PHP version 7.1 or newer is used for Magento upgrade, old Magento files… Read the rest
MAY 03 2020

Cannot redeclare Mage_Core_Helper_String::unserialize() in app/code/core/Mage/Core/Helper/String.php

Problem description Magento Checkout is blank/empty after installing SUPEE-10415, the following error logged in PHP error log: PHP Fatal error: Cannot redeclare Mage_Core_Helper_String::unserialize() in app/code/core/Mage/Core/Helper/String.php on line 505 Cause app/code/core/Mage/Core/Helper/String.php file got patched twice (either due to manual action or by file upload from another Magento version). As result, unserialize() function is defined twice and causing fatal error. Solution Delete extra definition of unserialize() function in app/code/core/Mage/Core/Helper/String.php file: If you have any difficulties with solving… Read the rest
MAY 03 2020

Cannot redefine class constant Mage_Customer_Model_Customer::MAXIMUM_PASSWORD_LENGTH in app/code/core/Mage/Customer/Model/Customer.php on line 55

Problem description After installing SUPEE-10415 Magento Checkout page is blank/empty. The following error logged in PHP error log or shown (if display_errors is enabled): PHP Fatal error: Cannot redefine class constant Mage_Customer_Model_Customer::MAXIMUM_PASSWORD_LENGTH in app/code/core/Mage/Customer/Model/Customer.php on line 55 Cause app/code/core/Mage/Customer/Model/Customer.php have MAXIMUM_PASSWORD_LENGTH constant declared two or more times. It can happen if the file was patched manually earlier or uploaded from newer Magento version. Solution Edit app/code/core/Mage/Customer/Model/Customer.php and delete the extra declaration of MAXIMUM_PASSWORD_LENGTH around line… Read the rest
MAY 28 2019

Magento Checkout is broken after SUPEE-11085 with PHP<5.5

Magento checkout page is broken after installing SUPEE-11085 (Authorize.net Direct Post Signature Key patch). Proceed to Checkout button results in a blank page, PHP fatal error is thrown: Fatal error: Can’t use method return value in write context in app/code/core/Mage/Authorizenet/Model/Directpost.php on line 392 Cause empty() function used in the patch with a function return value. As per official PHP documentation:Prior to PHP 5.5, empty() function only supports variables; anything else will result in a parse… Read the rest
MAY 28 2019

Call to undefined method Mage_Checkout_OnepageController::isFormkeyValidationOnCheckoutEnabled()

At Magento Onepage Checkout page nothing happens after clicking [Continue] button at Billing information step. It is not possible to proceed to Shipping, Magento checkout just stuck. The following error logged in PHP error log: PHP Fatal error: Call to undefined method Mage_Checkout_OnepageController::isFormkeyValidationOnCheckoutEnabled() in app/code/core/Mage/Checkout/controllers/OnepageController.php on line 374 Cause SUPEE-9767v2 (and v1 as well) added isFormkeyValidationOnCheckoutEnabled() function into app/code/core/Mage/Core/Controller/Front/Action.php file: Solution As the error says isFormkeyValidationOnCheckoutEnabled() is undefined: check if SUPEE-9767v2 was applied properly and… Read the rest
MAY 28 2019

Magento Checkout show blank page after SUPEE-10570 security patch

Problem description Proceeding to Magento Checkout page when logged in as a customer results in a blank page after SUPEE-10570 or Magento upgrade with Magento Compiler enabled. There are no any PHP errors logged or shown unlike PHP Parse error: syntax error, unexpected ‘[‘ PHP incompatibility case with SUPEE-10752 patch. Cause The problem occurs on trying to load a customer object using any available Magento methods, be it via Mage::getModel(‘customer/customer’) or Mage::getSingleton (‘customer/session’) at getPasswordTimestamp()… Read the rest
MAY 28 2019

Undefined class constant ‘XML_NODE_PRODUCT_MAX_DIMENSION’ in app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml on line 111


3 comments

Any attempt to edit product at Catalog > Manage Products in Magento backend results in a blank page and logs the following fatal error after SUPEE-8788 patch or Magento upgrade: Fatal error: Undefined class constant ‘XML_NODE_PRODUCT_MAX_DIMENSION’ in app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml on line 111 Cause XML_NODE_PRODUCT_MAX_DIMENSION constant used in the new app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml is defined in app/code/core/Mage/Catalog/Helper/Image.php with SUPEE-8788 applied: As the error says it can not find the constant definition, which may be possible due to one of… Read the rest
APR 04 2021

Uncaught ArgumentCountError: Too few arguments to function Mage_Sales_Model_Order::getCreatedAtFormated(), 0 passed

The following fatal PHP error is triggered on attempt to place order or send order confirmation email after upgrade to PHP 7.2 on Magento or OpenMage LTS stores: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Mage_Sales_Model_Order::getCreatedAtFormated(), 0 passed in lib/Varien/Filter/Template.php on line 301 and exactly 1 expected in app/code/core/Mage/Sales/Model/Order.php:2083 Cause There is a call to getCreatedAtFormated() function in somewhere in the order confirmation email templates and it is passed without any arguments,… Read the rest
SEP 22 2018

Magento Cannot save the customer after SUPEE-10888

After applying SUPEE-10888 the following error is reported in Backend when new customer is created: Cannot save the customer Solution Enable “Remember me” option should be set to No at System > Configuration > Persistent Shopping Cart Flush Magento cache