From fecb319d6b8d6421b64c24d09a474f0bfd583767 Mon Sep 17 00:00:00 2001 From: Tiavina Date: Thu, 9 Jan 2025 16:30:04 +0300 Subject: [PATCH] return empty when the user connected is thanatonly and there is no defunt related to the thanato on get defunts list --- gestion/lib/Db/Bdd.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gestion/lib/Db/Bdd.php b/gestion/lib/Db/Bdd.php index 7a589fa..33f3fd8 100644 --- a/gestion/lib/Db/Bdd.php +++ b/gestion/lib/Db/Bdd.php @@ -493,6 +493,9 @@ class Bdd { $defuntListConditionPlaceholder = implode(',', array_fill(0, count($defuntsIdRelatedToThanato), '?')); $conditions = $defuntsIdRelatedToThanato; $sql .= " WHERE ".$this->tableprefix."defunt.id IN ($defuntListConditionPlaceholder)"; + } + else{ + return json_encode([]); } } }