From fabb5bc7e6da2c17640ed4305322199f0a1d5955 Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 2 Jul 2020 13:21:01 +0700 Subject: [PATCH] [ticket/16488] Fix not displaying min input element attribute when 0 PHPBB3-16488 --- phpBB/includes/functions_acp.php | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index a013af2c89..3a02dcd503 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -284,27 +284,17 @@ function build_cfg_template($tpl_type, $key, &$new_ary, $config_key, $vars) case 'time': case 'number': case 'range': - $max = ''; - $min = ( isset($tpl_type[1]) ) ? (int) $tpl_type[1] : false; - if ( isset($tpl_type[2]) ) - { - $max = (int) $tpl_type[2]; - } + $min = isset($tpl_type[1]) ? (int) $tpl_type[1] : false; + $max = isset($tpl_type[2]) ? (int) $tpl_type[2] : false; - $tpl = ''; + $tpl = ''; break; case 'dimension': - $max = ''; + $min = isset($tpl_type[1]) ? (int) $tpl_type[1] : false; + $max = isset($tpl_type[2]) ? (int) $tpl_type[2] : false; - $min = (int) $tpl_type[1]; - - if ( isset($tpl_type[2]) ) - { - $max = (int) $tpl_type[2]; - } - - $tpl = ' x '; + $tpl = ' x '; break; case 'textarea':