-
-
Notifications
You must be signed in to change notification settings - Fork 452
Description
Preconditions (*)
- OpenMage 20.0.8
- PHP 8.0.3
Steps to reproduce (*)
- In Admin Panel, go to System -> Configuration and save any configuration you like
- Configuration is not saved, page goes white blank with this error in log:
Uncaught TypeError: method_exists():
Argument #1 ($object_or_class) must be of type object|string, bool given in /app/code/core/Mage/Core/Model/App.php:1409
Stack trace:
#0 /app/code/core/Mage/Core/Model/App.php(1409): method_exists()
#1 /app/code/core/Mage/Core/Model/App.php(1383): Mage_Core_Model_App->_callObserverMethod()
#2 /app/Mage.php(517): Mage_Core_Model_App->dispatchEvent()
#3 /app/code/core/Mage/Core/Model/Abstract.php(515): Mage::dispatchEvent()
#4 /app/code/core/Mage/Core/Model/Abstract.php(383): Mage_Core_Model_Abstract->_afterSave()
#5 /app/code/core/Mage/Core/Model/Resource/Transaction.php(150): Mage_Core_Model_Abstract->save()
#6 /app/code/core/Mage/Adminhtml/Model/Config/Data.php(215): Mage_Core_Model_Resource_Transaction->save()
Actual result (*)
I have fixed it just like this:
edit the line 1409 in file /app/code/core/Mage/Core/Model/App.php from:
if (method_exists($object, $method)) {
to:
if (is_object($object) && method_exists($object, $method)) {
Saving system configuration is now working well.