From 1efbe606fdef2657d18353fa964b53b3d0d39068 Mon Sep 17 00:00:00 2001 From: maxpozdeev Date: Sun, 17 Sep 2023 16:15:23 +0300 Subject: [PATCH] - fix: new tasks counter failed for newly created lists --- src/includes/api/TasksController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/includes/api/TasksController.php b/src/includes/api/TasksController.php index e2fb7bb..2c8eae6 100644 --- a/src/includes/api/TasksController.php +++ b/src/includes/api/TasksController.php @@ -260,7 +260,7 @@ class TasksController extends ApiController { checkReadAccess(); $lists = $this->req->jsonBody['lists'] ?? []; if (!is_array($lists)) $lists = []; - $userLists = []; + $userLists = []; // [string] if (!haveWriteAccess()) { $userLists = $this->getUserListsSimple(true); if ($userLists) { @@ -273,9 +273,7 @@ class TasksController extends ApiController { } $sqlWhereList = []; foreach ($lists as $item) { - if (!isset($item['later'])) continue; - $later = (int)$item['later']; - if ($later <= 0) continue; + $later = (int) ($item['later'] ?? 0); $sqlWhereList[] = "(list_id = ". (int)$item['listId']. " AND compl=0 AND d_created > $later)"; }