stripslashes in update_usermeta messes up meta_values for arrays/objects
|Reported by:||stm||Owned by:||markjaquith|
|Component:||Administration||Keywords:||bug serialize needs-patch|
the change made in rev  caused a problem when trying to set a non-string as a meta_value.
There should be a check made to see if the object is a string before doing a stripslashes.
if ( !is_array($meta_value) && !is_object($meta_value) ) $meta_value = stripslashes($meta_value);
I found this because it was making the Administrator capabilites be 'Array' in the db instead of the serialized array of capabilities it was supposed to be set to.
Change History (4)
comment:2 @markjaquith — 8 years ago
- Keywords needs-patch added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned