diff --git a/restapi/index.php b/restapi/index.php index 7ca7dcd3e..5bc4535eb 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -2659,8 +2659,8 @@ final class SeedDMS_RestapiController { /* {{{ */ $params = $request->getParsedBody(); /* Setting an empty comment is allowed. */ - if ($params['comment']) { - return $this->renderer->json($response, array('success'=>false, 'message'=>'You must supply a new name', 'data'=>''))->withStatus(400); + if (empty($params['comment'])) { + return $this->renderer->json($response, array('success'=>false, 'message'=>'You must supply a new comment', 'data'=>''))->withStatus(400); } $newcomment = $params['comment'];