Merge pull request #616 from jgen/develop

Another location where $tags should be an array instead of a string.
This commit is contained in:
Shish 2017-05-15 13:02:36 +01:00 committed by GitHub
commit 8440826f50

View File

@ -311,6 +311,7 @@ class CronUploader extends Extension {
*/ */
private function add_image($tmpname, $filename, $tags) { private function add_image($tmpname, $filename, $tags) {
assert ( file_exists ( $tmpname ) ); assert ( file_exists ( $tmpname ) );
assert('is_string($tags)');
$pathinfo = pathinfo ( $filename ); $pathinfo = pathinfo ( $filename );
if (! array_key_exists ( 'extension', $pathinfo )) { if (! array_key_exists ( 'extension', $pathinfo )) {
@ -333,7 +334,7 @@ class CronUploader extends Extension {
// Set tags // Set tags
$img = Image::by_id($event->image_id); $img = Image::by_id($event->image_id);
$img->set_tags($tags); $img->set_tags(Tag::explode($tags));
} }
private function generate_image_queue($base = "", $subdir = "") { private function generate_image_queue($base = "", $subdir = "") {