Fix static analysis

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pull/1500/head
Carl Schwan 2022-10-27 13:56:08 +02:00
rodzic 451de949eb
commit e3e60b44ff
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -125,7 +125,7 @@ class LocalController extends Controller {
* @NoAdminRequired
*/
public function postCreate(string $content = '', $to = null, string $type = null, ?string $replyTo = null, $attachments = null, ?string $hashtags = null): DataResponse {
$content = $content ?? '';
$content = $content ?: '';
$to = is_string($to) ? [$to] : $to;
$to = $to ?? [];
$replyTo = $replyTo ?? '';