mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 09:17:03 +00:00
Update ComposeController, bail on empty attachments
This commit is contained in:
parent
29947e157c
commit
061b145b54
1 changed files with 2 additions and 0 deletions
|
@ -480,6 +480,8 @@ class ComposeController extends Controller
|
|||
array_push($mimes, $m->mime);
|
||||
}
|
||||
|
||||
abort_if(empty($attachments), 422);
|
||||
|
||||
$mediaType = StatusController::mimeTypeCheck($mimes);
|
||||
|
||||
if(in_array($mediaType, ['photo', 'video', 'photo:album']) == false) {
|
||||
|
|
Loading…
Reference in a new issue