From 3ffb2da91cd1deef07ec92f62f639ce840df18cc Mon Sep 17 00:00:00 2001 From: jgen Date: Sat, 13 May 2017 23:18:47 -0700 Subject: [PATCH] More checking to ensure tags is an array. --- ext/ouroboros_api/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/ouroboros_api/main.php b/ext/ouroboros_api/main.php index f58190b2..963832a2 100644 --- a/ext/ouroboros_api/main.php +++ b/ext/ouroboros_api/main.php @@ -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