// Rollback a modification in object model

This commit is contained in:
Damien Metzger
2013-08-06 16:52:13 +02:00
parent a1cf8d462f
commit 2303677ebf
+5 -7
View File
@@ -858,15 +858,13 @@ abstract class ObjectModelCore
continue;
$values = $this->$field;
// If the object has not been loaded in multilanguage, then the value is the one for the current language of the object
if (!is_array($values))
{
$value = $values;
$values = array();
$values[$this->id_lang] = $value;
$values[Configuration::get('PS_LANG_DEFAULT')] = $value;
}
$values = array($this->id_lang => $values);
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
// The value for the default must always be set, so we put an empty string if it does not exists
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
foreach ($values as $id_lang => $value)