From 7aad6683fad60ae70846a063fdf26c778db065d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Jan 2017 10:50:37 +0100 Subject: [PATCH] Add cast to remove scrutinizer warning --- htdocs/adherents/type.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index cab52dceccc..85b591f0fca 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -91,10 +91,10 @@ if ($action == 'add' && $user->rights->adherent->configurer) $object = new AdherentType($db); $object->libelle = trim($label); - $object->subscription = trim($subscription); + $object->subscription = (int) trim($subscription); $object->note = trim($comment); - $object->mail_valid = trim($mail_valid); - $object->vote = trim($vote); + $object->mail_valid = (boolean) trim($mail_valid); + $object->vote = (boolean) trim($vote); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); @@ -129,10 +129,10 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object = new AdherentType($db); $object->id = $rowid; $object->libelle = trim($label); - $object->subscription = trim($subscription); + $object->subscription = (int) trim($subscription); $object->note = trim($comment); - $object->mail_valid = trim($mail_valid); - $object->vote = trim($vote); + $object->mail_valid = (boolean) trim($mail_valid); + $object->vote = (boolean) trim($vote); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object);