1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16582] Fix SQL error on registration with Numbers CPF with no default

PHPBB3-16582
This commit is contained in:
rxu
2020-11-28 17:52:27 +07:00
parent 5a55891d06
commit 022b58f986
2 changed files with 65 additions and 1 deletions

View File

@@ -259,7 +259,10 @@ class manager
* Replace Emoji and other 4bit UTF-8 chars not allowed by MySQL
* with their Numeric Character Reference's Hexadecimal notation.
*/
$cp_data['pf_' . $row['field_ident']] = utf8_encode_ucr($cp_data['pf_' . $row['field_ident']]);
if (is_string($cp_data['pf_' . $row['field_ident']]))
{
$cp_data['pf_' . $row['field_ident']] = utf8_encode_ucr($cp_data['pf_' . $row['field_ident']]);
}
$check_value = $cp_data['pf_' . $row['field_ident']];