aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 77dc3f073..e2624132d 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -144,9 +144,11 @@
{
if (is_array($value))
{
+ remove_metadata($this->getGUID(), $name);
$multiple = true;
- foreach ($value as $v)
- if (!create_metadata($this->getGUID(), $name, $v, $value_type, $this->getOwner(), $this->getAccessID(), $multiple)) return false;
+ foreach ($value as $v) {
+ if (!create_metadata($this->getGUID(), $name, $v, $value_type, $this->getOwner(), $this->getAccessID(), $multiple)) return false;
+ }
return true;
}