From 48632bbb3f892f7944782176f753c221040872c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 Sep 2020 17:23:42 +0200 Subject: [PATCH] Clean code --- htdocs/core/lib/functions2.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 7b0042cf55a..b5a51032bdd 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1182,6 +1182,7 @@ function check_value($mask, $value) $hasglobalcounter = false; // Extract value for mask counter, mask raz and mask offset + $reg = array(); if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i', $mask, $reg)) { $masktri = $reg[1].(isset($reg[2]) ? $reg[2] : '').(isset($reg[3]) ? $reg[3] : ''); @@ -1192,12 +1193,12 @@ function check_value($mask, $value) $masktri = '00000'; $maskcounter = '00000'; } - $maskraz = -1; $maskoffset = 0; if (dol_strlen($maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits'; // Extract value for third party mask counter + $regClientRef = array(); if (preg_match('/\{(c+)(0*)\}/i', $mask, $regClientRef)) { $maskrefclient = $regClientRef[1].$regClientRef[2];