This commit is contained in:
Shish
2024-01-05 15:32:07 +00:00
parent 4b954b2e68
commit 26630a4e3b
4 changed files with 7 additions and 6 deletions

View File

@ -224,7 +224,9 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
"tags" => Tag::explode($tags), "tags" => Tag::explode($tags),
"source" => null, "source" => null,
])); ]));
if(count($dae->images) == 0) throw new \Exception("Upload failed :("); if(count($dae->images) == 0) {
throw new \Exception("Upload failed :(");
}
return $dae->images[0]->id; return $dae->images[0]->id;
} }

View File

@ -170,7 +170,7 @@ class GraphQL extends Extension
'source' => $source, 'source' => $source,
])); ]));
return ["image_ids" => array_map(fn($im) => $im->id, $event->images)]; return ["image_ids" => array_map(fn ($im) => $im->id, $event->images)];
} }
public function onCommand(CommandEvent $event) public function onCommand(CommandEvent $event)

View File

@ -120,8 +120,7 @@ class S3 extends Extension
if(is_null($new_tags)) { if(is_null($new_tags)) {
$friendly = $image->parse_link_template('$id - $tags.$ext'); $friendly = $image->parse_link_template('$id - $tags.$ext');
} } else {
else {
$_orig_tags = $image->get_tag_array(); $_orig_tags = $image->get_tag_array();
$image->tag_array = $new_tags; $image->tag_array = $new_tags;
$friendly = $image->parse_link_template('$id - $tags.$ext'); $friendly = $image->parse_link_template('$id - $tags.$ext');