From 468204c6e9f12f26cfcad0e4fd6377b69082dee7 Mon Sep 17 00:00:00 2001 From: wouldsmina Date: Thu, 20 Feb 2020 23:15:30 +0100 Subject: [PATCH] =?UTF-8?q?Patch=20ajout=20d'un=20utilisateur=20avec=20heu?= =?UTF-8?q?res=20d=C3=A9sactiv=C3=A9s=20(#891)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * patch bug ajout user avec heures désactivés * Update hr_ajout_user.php --- hr/hr_ajout_user.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hr/hr_ajout_user.php b/hr/hr_ajout_user.php index b15dbdcca..9e4b9ffca 100755 --- a/hr/hr_ajout_user.php +++ b/hr/hr_ajout_user.php @@ -71,7 +71,9 @@ function dataForm2Array(array $htmlPost, \includes\SQL $sql, \App\Libraries\Conf $data['nom'] = htmlentities($htmlPost['new_nom'], ENT_QUOTES | ENT_HTML401); $data['prenom'] = htmlentities($htmlPost['new_prenom'], ENT_QUOTES | ENT_HTML401); $data['quotite'] = (int) $htmlPost['new_quotite']; - $data['soldeHeure'] = htmlentities($htmlPost['new_solde_heure'], ENT_QUOTES | ENT_HTML401); + $data['soldeHeure'] = key_exists('new_solde_heure', $htmlPost) + ? htmlentities($htmlPost['new_solde_heure'], ENT_QUOTES | ENT_HTML401) + : '00:00'; $data['isActive'] = 'N' === $htmlPost['new_is_active'] ? 'N' : 'Y'; $data['isResp'] = 'Y' === $htmlPost['new_is_resp'] ? 'Y' : 'N'; $data['isAdmin'] = 'Y' === $htmlPost['new_is_admin'] ? 'Y' : 'N';