diff options
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 3c679f5cd..94f3e56e7 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -199,9 +199,9 @@ { unset($this->temp_metadata[$name]); remove_metadata($this->getGUID(), $name); - $multiple = true; foreach ($value as $v) { - if ((int) $this->guid > 0) { + if ((int) $this->guid > 0) {
+ $multiple = true; if (!create_metadata($this->getGUID(), $name, $v, $value_type, $this->getOwner(), $this->getAccessID(), $multiple)) return false; } else { if (($multiple) && (isset($this->temp_metadata[$name]))) @@ -223,7 +223,8 @@ return true; } else - { + {
+ unset($this->temp_metadata[$name]); if ((int) $this->guid > 0) { return create_metadata($this->getGUID(), $name, $value, $value_type, $this->getOwner(), $this->getAccessID(), $multiple); } else { |