From 2bd701a87f54c6fc5fc795ffa04274e39d36b3f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Sep 2024 16:46:16 +0200 Subject: [PATCH] Debug v20 --- htdocs/core/lib/functions2.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 00deffe10ad..d6149ce89e1 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1000,12 +1000,12 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskuser_value = ''; } - // Personalized field {XXX-1} à {XXX-9} + // Personalized field {XXX-1} à {XXX-99} $maskperso = array(); $maskpersonew = array(); $tmpmask = $mask; $regKey = array(); - while (preg_match('/\{([A-Z]+)\-([1-9])\}/', $tmpmask, $regKey)) { + while (preg_match('/\{([A-Z]+)\-([0-9]+)\}/', $tmpmask, $regKey)) { $maskperso[$regKey[1]] = '{'.$regKey[1].'-'.$regKey[2].'}'; // @phan-suppress-next-line PhanParamSuspiciousOrder $maskpersonew[$regKey[1]] = str_pad('', (int) $regKey[2], '_', STR_PAD_RIGHT);