Published: May 22, 2019
Last updated:

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 54:
--- app/code/core/Mage/Customer/Model/Customer.php
+++ app/code/core/Mage/Customer/Model/Customer.php
@@ -51,15 +51,10 @@
     /**
      * Maximum Password Length
      */
     const MAXIMUM_PASSWORD_LENGTH = 256;
 
-    /**
-     * Maximum Password Length
-     */
-    const MAXIMUM_PASSWORD_LENGTH = 256;
-
     /**#@+
      * Codes of exceptions related to customer model
      */
     const EXCEPTION_EMAIL_NOT_CONFIRMED       = 1;
     const EXCEPTION_INVALID_EMAIL_OR_PASSWORD = 2;


If you have any difficulties with solving this problem or got a similar one, please let us know in comments below, so we can find the solution together.

Posted in: Fatal errors, supee-10415

42 votes, 4.72 avg. rating (93% score)