Ensure that lists have a title

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2022-07-05 22:20:59 +02:00
parent 8ee0a0fad0
commit f98b5764ea

View File

@@ -214,7 +214,7 @@ class StackService {
* @throws BadRequestException * @throws BadRequestException
*/ */
public function create($title, $boardId, $order) { 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'); throw new BadRequestException('title must be provided');
} }
@@ -291,7 +291,7 @@ class StackService {
throw new BadRequestException('stack id must be a number'); 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'); throw new BadRequestException('title must be provided');
} }