Last active
December 11, 2015 21:48
-
-
Save mshmsh5000/4664829 to your computer and use it in GitHub Desktop.
Magento: Temporary fix for failed configuration saves. See http://screencast.com/t/7yGn07BMGSY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// app/code/core/Mage/Adminhtml/Model/Config/Data.php: 135: | |
/** | |
* Get field backend model | |
*/ | |
$backendClass = $fieldConfig->backend_model; | |
if (!$backendClass) { | |
$backendClass = 'core/config_data'; | |
} | |
// Just silence the notice while you save. | |
/** | |
* Get field backend model | |
*/ | |
$backendClass = @$fieldConfig->backend_model; // Note the '@' here. | |
if (!$backendClass) { | |
$backendClass = 'core/config_data'; | |
} | |
// Or, a more permanent fix, if you're into | |
// fixing core bugs. | |
/** | |
* Get field backend model | |
*/ | |
if (!is_object($fieldConfig) || empty($fieldConfig->backend_model)) { | |
$backendClass = 'core/config_data'; | |
} | |
else { | |
$backendClass = $fieldConfig->backend_model; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment