Skip to content

Instantly share code, notes, and snippets.

@mshmsh5000
Last active December 11, 2015 21:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshmsh5000/4664829 to your computer and use it in GitHub Desktop.
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
<?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