From 64ae70d106ac8aaac679a1c4af1b919631dbf5d4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2018 15:19:02 +0100 Subject: [PATCH] Fix scrutinizer bug --- htdocs/adherents/class/subscription.class.php | 2 +- htdocs/compta/bank/bankentries_list.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index ae8470e3eee..8d4b1884bab 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -88,7 +88,7 @@ class Subscription extends CommonObject $sql.= " '".$this->db->escape($this->note)."')"; $resql = $this->db->query($sql); - if ($res===false) { + if (! $resql) { $error++; $this->errors[] = $this->db->lasterror(); } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index baa3d9e3716..0493ffef3b0 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -663,7 +663,7 @@ if ($resql) print ''; print ''; print ''; - if ($options) { + if (is_array($options) && count($options)) { print '
'.$langs->trans("Rubrique").': '; print Form::selectarray('cat1', $options, GETPOST('cat1'), 1); }