Custom profile field comparison fails

Started by iksa, March 04, 2014, 04:06:05 PM

Previous topic - Next topic

iksa

If, for example, you have the value "123" (without quotes) stored in a text type custom profile field and, through the profile settings, you modify the value to be "0123" (without quotes) the changed value will not be stored in the database because the code thinks it did not change.

I think that in Profile-Modify.php this line

if (!isset($user_profile[$memID]['options'][$row['col_name']]) || $user_profile[$memID]['options'][$row['col_name']] != $value)

should be

if (!isset($user_profile[$memID]['options'][$row['col_name']]) || $user_profile[$memID]['options'][$row['col_name']] !== $value)

I noticed the issue in version 2.0.7 and it seems to exist also in 2.1

Advertisement: