From 9e250ae19b340557a11931af8dc4c870c6f1d326 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Mon, 12 Feb 2024 18:12:54 +0100 Subject: [PATCH] qual: phpstan for htdocs/loan/class/loanschedule.class.php (#28119) * qual: phpstan for htdocs/loan/class/loanschedule.class.php htdocs/loan/class/loanschedule.class.php 308 Property LoanSchedule::$num_payment (int) does not accept string. htdocs/loan/class/loanschedule.class.php 317 Property LoanSchedule::$fk_bank (int) does not accept string. * $num_payment is a string, not an int --- htdocs/loan/class/loanschedule.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index ffe1942998e00..135198de4a7ce 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -315,7 +315,7 @@ public function update($user = 0, $notrigger = 0) $this->note_public = trim($this->note_public); } if (isset($this->fk_bank)) { - $this->fk_bank = trim($this->fk_bank); + $this->fk_bank = (int) $this->fk_bank; } if (isset($this->fk_payment_loan)) { $this->fk_payment_loan = (int) $this->fk_payment_loan;