From f98b5764eaefb2e76883f8948a61d4568ffe35e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 5 Jul 2022 22:20:59 +0200 Subject: [PATCH] Ensure that lists have a title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/StackService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Service/StackService.php b/lib/Service/StackService.php index 5d993b8e3..da80bbda6 100644 --- a/lib/Service/StackService.php +++ b/lib/Service/StackService.php @@ -214,7 +214,7 @@ class StackService { * @throws BadRequestException */ public function create($title, $boardId, $order) { - if ($title === false || $title === null) { + if ($title === false || $title === null || mb_strlen($title) === 0) { throw new BadRequestException('title must be provided'); } @@ -291,7 +291,7 @@ class StackService { throw new BadRequestException('stack id must be a number'); } - if ($title === false || $title === null) { + if ($title === false || $title === null || mb_strlen($title) === 0) { throw new BadRequestException('title must be provided'); }