From 4df0e3890bd697de790638d2288f4cda3fcd1722 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 18 Mar 2024 02:30:50 +0100 Subject: [PATCH] Fix is already int, remove trim&casts fixes PhanTypeMismatchArgumentInternal --- htdocs/adherents/type.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index df36f5c95da..1be94641271 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -145,7 +145,7 @@ if ($action == 'add' && $user->hasRight('adherent', 'configurer')) { $object->note_public = trim($comment); $object->note_private = ''; $object->mail_valid = trim($mail_valid); - $object->vote = (int) $vote; + $object->vote = $vote; // $vote is already int // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); @@ -201,7 +201,7 @@ if ($action == 'update' && $user->hasRight('adherent', 'configurer')) { $object->note_public = trim($comment); $object->note_private = ''; $object->mail_valid = trim($mail_valid); - $object->vote = (bool) trim($vote); + $object->vote = $vote; // $vote is already int. // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');