mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +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);
|
array_push($mimes, $m->mime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abort_if(empty($attachments), 422);
|
||||||
|
|
||||||
$mediaType = StatusController::mimeTypeCheck($mimes);
|
$mediaType = StatusController::mimeTypeCheck($mimes);
|
||||||
|
|
||||||
if(in_array($mediaType, ['photo', 'video', 'photo:album']) == false) {
|
if(in_array($mediaType, ['photo', 'video', 'photo:album']) == false) {
|
||||||
|
|
Loading…
Reference in a new issue