Commit be1bb7c5 authored by Mark Harding's avatar Mark Harding

(fix): ensure arrays are sent to tags and not objects

parent 5e6901e0
No related merge requests found
Pipeline #70775134 passed with stages
in 8 minutes and 16 seconds
......@@ -186,7 +186,7 @@ class EntityMapping implements MappingInterface
$map['tags'] = [];
}
$map['tags'] = array_unique(array_merge($map['tags'], array_map('strtolower', $tags)));
$map['tags'] = array_values(array_unique(array_merge($map['tags'], array_map('strtolower', $tags))));
$map['nsfw'] = array_unique($this->entity->getNsfw());
......
......@@ -33,7 +33,7 @@ class GroupMapping extends EntityMapping implements MappingInterface
$map['membership'] = (int) $this->entity->getMembership();
$map['public'] = $map['membership'] == ACCESS_PUBLIC;
$map['tags'] = array_unique(array_merge($map['tags'], $this->entity->getTags()));
$map['tags'] = array_values(array_unique(array_merge($map['tags'], $this->entity->getTags())));
$map['rating'] = $this->entity->getRating();
return $map;
......
......@@ -53,7 +53,7 @@ class UserMapping extends EntityMapping implements MappingInterface
$map['group_membership'] = [];
}
$map['tags'] = array_unique($this->entity->getTags());
$map['tags'] = array_values(array_unique($this->entity->getTags()));
return $map;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment