From 3108d0b0608d12e8f1e2e10dfa8d802ad86eb908 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 11 Nov 2014 16:28:06 -0800 Subject: [PATCH] [ticket/13209] Fix expected request value of CPF language fields. Multiple languages can be edited, thus the expected value is an array. PHPBB3-13209 --- phpBB/phpbb/profilefields/type/type_base.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php index 52f5d15511..9b4bada26d 100644 --- a/phpBB/phpbb/profilefields/type/type_base.php +++ b/phpBB/phpbb/profilefields/type/type_base.php @@ -158,7 +158,19 @@ abstract class type_base implements type_interface } else { - return $this->request->variable($key, '', true); + $default_value = ''; + $lang_fields = array( + 'l_lang_name', + 'l_lang_explain', + 'l_lang_default_value', + 'l_lang_options', + ); + + if (in_array($key, $lang_fields)) + { + $default_value = array(0 => ''); + } + return $this->request->variable($key, $default_value, true); } }