From 036c4bc7300e5fe3b70e9194c6bc23d409ebac83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Mar 2021 18:01:41 +0100 Subject: [PATCH] Fix phpcs --- htdocs/salaries/admin/salaries.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/salaries/admin/salaries.php b/htdocs/salaries/admin/salaries.php index f8c486596cc..dc0cc5b14a0 100644 --- a/htdocs/salaries/admin/salaries.php +++ b/htdocs/salaries/admin/salaries.php @@ -68,8 +68,9 @@ if ($action == 'update') { } } -// Set boolean (on/off) constants -elseif (preg_match('/^(set|del)_?([A-Z_]+)$/', $action, $reg)) { +$reg = array(); +if (preg_match('/^(set|del)_?([A-Z_]+)$/', $action, $reg)) { + // Set boolean (on/off) constants if (!dolibarr_set_const($db, $reg[2], ($reg[1] === 'set' ? '1' : '0'), 'chaine', 0, '', $conf->entity) > 0) { dol_print_error($db); }