// Rollback a modification in object model

This commit is contained in:
Damien Metzger committed 2013-08-06 16:52:13 +02:00
1 parent a1cf8d462f
commit 2303677ebf
1 file changed
+5 -7
+5 -7
View File
@@ -858,15 +858,13 @@ abstract class ObjectModelCore
continue; continue;
$values = $this->$field; $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)) if (!is_array($values))
{ $values = array($this->id_lang => $values);
$value = $values;
$values = array();
$values[$this->id_lang] = $value;
$values[Configuration::get('PS_LANG_DEFAULT')] = $value;
}
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')] = ''; $values[Configuration::get('PS_LANG_DEFAULT')] = '';
foreach ($values as $id_lang => $value) foreach ($values as $id_lang => $value)