diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type.php src/bp-xprofile/classes/class-bp-xprofile-field-type.php
index 46d412a..c983168 100644
|
|
abstract class BP_XProfile_Field_Type { |
180 | 180 | $validated = true; |
181 | 181 | } |
182 | 182 | |
183 | | // If there's a whitelist set, also check the $value. |
| 183 | // If there's a whitelist set, make sure that each value is a whitelisted value. |
184 | 184 | if ( ( true === $validated ) && ! empty( $values ) && ! empty( $this->validation_whitelist ) ) { |
185 | 185 | foreach ( (array) $values as $value ) { |
186 | | $validated = in_array( $value, $this->validation_whitelist, true ); |
| 186 | if ( ! in_array( $value, $this->validation_whitelist, true ) ) { |
| 187 | $validated = false; |
| 188 | break; |
| 189 | } |
187 | 190 | } |
188 | 191 | } |
189 | 192 | |