Fix error upon bulk add.

Fixes "PHP Fatal error:  Uncaught TypeError: Argument 2 passed to
TagSetEvent::__construct() must be of the type array, string given"
upon bulk add.
This commit is contained in:
Thomas Hori 2017-04-25 17:48:34 +01:00
parent d608b68387
commit 1625bd68e3

View File

@ -1219,7 +1219,7 @@ function add_dir($base) {
$short_path = str_replace($base, "", $full_path); $short_path = str_replace($base, "", $full_path);
$filename = basename($full_path); $filename = basename($full_path);
$tags = path_to_tags($short_path); $tags = Tag::explode(path_to_tags($short_path));
$result = "$short_path (".str_replace(" ", ", ", $tags).")... "; $result = "$short_path (".str_replace(" ", ", ", $tags).")... ";
try { try {
add_image($full_path, $filename, $tags); add_image($full_path, $filename, $tags);