diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 17ba854d6..ebe12dc1c 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -940,8 +940,8 @@ abstract class ObjectModelCore { global $_FIELDS; - if (file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php')) - include(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'); + if ($_FIELDS === null && file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php')) + include_once(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'); $key = $class.'_'.md5($field); return ((is_array($_FIELDS) && array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field); @@ -1596,4 +1596,4 @@ abstract class ObjectModelCore { $this->update_fields = $fields; } -} +} \ No newline at end of file