From 5b6a0d0775485477d9ad0f5a536cf3ddb3f8afb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Tue, 13 Nov 2018 12:29:54 +0100 Subject: [PATCH] :ambulance: fix(template) Fix substring unique modifier range computation issue #5882 --- include/class_templateHandling.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_templateHandling.inc b/include/class_templateHandling.inc index f8823b501..5a21817cd 100644 --- a/include/class_templateHandling.inc +++ b/include/class_templateHandling.inc @@ -349,7 +349,7 @@ class templateHandling } if (preg_match('/^(\d+)-(\d+)$/', $args[1], $m)) { $res = array(); - for ($i = $m[1];$i < $m[2]; ++$i) { + for ($i = $m[1];$i <= $m[2]; ++$i) { $res[] = mb_substr($str, $args[0], $i); } return array_unique($res); -- GitLab