Bug: Call to an undefined method in Mage_Tax_Model_Config_Price_Include#5097
Bug: Call to an undefined method in Mage_Tax_Model_Config_Price_Include#5097sreichel wants to merge 3 commits intoOpenMage:mainfrom
Mage_Tax_Model_Config_Price_Include#5097Conversation
sreichel
commented
Nov 14, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a fatal error caused by calling a non-existent afterSave() method on the parent class Mage_Core_Model_Config_Data. The fix corrects the parent method call from parent::afterSave() to parent::_afterSave().
Key changes:
- Updates the parent method call to use the correct protected method name
_afterSave()instead of the non-existent publicafterSave()method - Removes the corresponding PHPStan baseline entry for the undefined static method error
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/code/core/Mage/Tax/Model/Config/Price/Include.php | Corrects parent method call from afterSave() to _afterSave() |
| .phpstan.dist.baseline.neon | Removes PHPStan baseline entry for the now-fixed undefined method error |
| public function afterSave() | ||
| { | ||
| parent::afterSave(); | ||
| parent::_afterSave(); | ||
| Mage::app()->cleanCache('checkout_quote'); | ||
| } |
There was a problem hiding this comment.
The method signature should be protected function _afterSave() instead of public function afterSave(). In the Magento lifecycle, _afterSave() is the protected hook method that gets called automatically during the save process. Other Config_Data subclasses (like Mage_Adminhtml_Model_System_Config_Backend_Cache) follow this pattern by overriding protected function _afterSave(). The current implementation creates a public method that won't be called by the framework's save lifecycle.
- see OpenMage#5097
* update * update * composer.lock * fix cast to int * fix cast to int - allow float * fix * fix * baseline - see #5097
|


