// Rollback a modification in object model
This commit is contained in:
1 parent
a1cf8d462f
commit
2303677ebf
1 file changed
+5
-7
@@ -858,14 +858,12 @@ abstract class ObjectModelCore
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
$values = $this->$field;
|
$values = $this->$field;
|
||||||
if (!is_array($values))
|
|
||||||
{
|
|
||||||
$value = $values;
|
|
||||||
$values = array();
|
|
||||||
$values[$this->id_lang] = $value;
|
|
||||||
$values[Configuration::get('PS_LANG_DEFAULT')] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 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))
|
||||||
|
$values = array($this->id_lang => $values);
|
||||||
|
|
||||||
|
// 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')]))
|
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
|
||||||
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
|
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user