Fix errors in all modules

This commit is contained in:
Art4 2024-11-18 22:20:28 +00:00
parent 6cb9676250
commit f254283dc6
9 changed files with 15 additions and 14 deletions

View file

@ -31,7 +31,7 @@ class Markers extends BaseApi
}
}
if (empty($timeline) || empty($last_read_id) || empty($application['id'])) {
if ($timeline === '' || $last_read_id === '' || empty($application['id'])) {
$this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity());
}

View file

@ -28,12 +28,12 @@ class Show extends ContactEndpoint
$target_cid = BaseApi::getContactIDForSearchterm($this->getRequestValue($request, 'target_screen_name', ''), '', $this->getRequestValue($request, 'target_id', 0), $uid);
$source = Contact::getById($source_cid);
if (empty($source)) {
if ($source === false) {
throw new NotFoundException('Source not found');
}
$target = Contact::getById($target_cid);
if (empty($source)) {
if ($target === false) {
throw new NotFoundException('Target not found');
}