From eefc6ddf83bce48847aa758a575d4f8a2757ba44 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jun 2021 18:44:01 +0200 Subject: [PATCH] Fix phpcs --- htdocs/compta/bank/card.php | 1 - htdocs/compta/bank/class/account.class.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 143d3bb600b..7f1c830d45b 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -78,7 +78,6 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if (empty($reshook)) { - if ($cancel) { $action = ''; } diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 0d97ed69a07..46d1bb93684 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -705,8 +705,8 @@ class Account extends CommonObject $sql .= ", ".price2num($this->min_allowed); $sql .= ", ".price2num($this->min_desired); $sql .= ", '".$this->db->escape($this->comment)."'"; - $sql .= ", ".($this->state_id > 0 ? $this->state_id : "null"); - $sql .= ", ".($this->country_id > 0 ? $this->country_id : "null"); + $sql .= ", ".($this->state_id > 0 ? ((int) $this->state_id) : "null"); + $sql .= ", ".($this->country_id > 0 ? ((int) $this->country_id) : "null"); $sql .= ", '".$this->db->escape($this->ics)."'"; $sql .= ", '".$this->db->escape($this->ics_transfer)."'"; $sql .= ")";