From 05bb2c720d06501eb6e744996201e0b9c5b0bd7e Mon Sep 17 00:00:00 2001 From: damien clochard Date: Mon, 21 Jun 2021 18:24:52 +0200 Subject: [PATCH] FIX #17996: Avoid implicit type casts for llx_adherent_type.subscription The llx_adherent_type.subscription column is VARCHAR so we need to compare it with a string, not an int. --- htdocs/adherents/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 7a4a7d5bc1f..d669270b565 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -363,13 +363,13 @@ if ($search_type > 0) { $sql .= " AND t.rowid=".((int) $search_type); } if ($search_filter == 'withoutsubscription') { - $sql .= " AND (datefin IS NULL OR t.subscription = 0)"; + $sql .= " AND (datefin IS NULL OR t.subscription = '0')"; } if ($search_filter == 'uptodate') { - $sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = 0)"; + $sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')"; } if ($search_filter == 'outofdate') { - $sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = 1)"; + $sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = '1')"; } if ($search_status != '') { // Peut valoir un nombre ou liste de nombre separes par virgules