More checking to ensure tags is an array.
This commit is contained in:
parent
7ebe301ffd
commit
3ffb2da91c
1 changed files with 2 additions and 1 deletions
|
@ -536,7 +536,8 @@ class OuroborosAPI extends Extension
|
|||
if (!is_null($img)) {
|
||||
$handler = $config->get_string("upload_collision_handler");
|
||||
if($handler == "merge") {
|
||||
$merged = array_merge(Tag::explode($post->tags), $img->get_tag_array());
|
||||
$postTags = is_array($post->tags) ? $post->tags : Tag::explode($post->tags);
|
||||
$merged = array_merge($postTags, $img->get_tag_array());
|
||||
send_event(new TagSetEvent($img, $merged));
|
||||
|
||||
// This is really the only thing besides tags we should care
|
||||
|
|
Reference in a new issue