From 8993fa940f9920b161639e39c483a1476a9c71ab Mon Sep 17 00:00:00 2001
From: Senky <jakubsenko@gmail.com>
Date: Mon, 20 Aug 2012 09:25:25 +0200
Subject: [PATCH] [ticket/11010] fixing problems with 4th parameter in number
type
PHPBB3-11010
---
phpBB/includes/functions_acp.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index 38ddff0c38..3aca1af229 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -261,7 +261,8 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
$min = (int) $tpl_type[1];
$max = $maxlength = (int) $tpl_type[2];
- if ($tpl_type[3] != 'true')
+ // $tpl_type[3] is not always present
+ if (!isset($tpl_type[3]) || (isset($tpl_type[3]) && $tpl_type[3] != 'true'))
{
$max = str_repeat('9', $max);
}