The edit user page was breaking if one feature_flags value is set but not the other. Things were fine if the user had no feature_flags or had both feature_flags (here being badges and refer-friends).
@mendelB found this tidbit to explain that behavior:
PHP won't attempt the comparison if the array is null.
In the second circumstance, a comparison does occur because the array is set. PHP does not check to see if it is empty.
and he also suggested using data_get to make sure we aren't trying to access null elements. I've made that update here!
The edit user page was breaking if one
feature_flags
value is set but not the other. Things were fine if the user had nofeature_flags
or had bothfeature_flags
(here beingbadges
andrefer-friends
).@mendelB found this tidbit to explain that behavior:
and he also suggested using
data_get
to make sure we aren't trying to accessnull
elements. I've made that update here!