After upgrading on of my clients environment from PHP7 to PHP 7.2, the client reported not being able to open any customers in the admin dashboard. The logs showed the following error:
PHP Fatal error: Declaration of Mage_Customer_Model_Customer_Attribute_Source_Website::getAllOptions() must be compatible with Mage_Eav_Model_Entity_Attribute_Source_Table::getAllOptions($withEmpty = true, $defaultValues = false) in /app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Website.php on line 34
To fix this I add to overwrite a few Magento core files and change the function getAllOptions .
In order to still be able to update your Magento shop, copy the following files from /app/code/core/ to /app/code/local .
Now copy the following files to you local folder:
/app/code/core/Mage/Customer/Model/Resource/Address/Attribute/Source/Country.php /app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Source/Country.php /app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Group.php /app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Website.php
In those files you need to replace the following line
public function getAllOptions()
with
public function getAllOptions($withEmpty = true, $defaultValues = false)
Hi Kevin…I just wanted to say thanks this actually helped me, good job!
thanks to kevin its working
Worked like a charm. thanks buddy
Well this got me out of a sticky situation. Thank you so much.
thanks bro. i hav fix my site backend