#3240 closed defect (bug) (fixed)
stripslashes in update_usermeta messes up meta_values for arrays/objects
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | bug serialize needs-patch |
| Focuses: | Cc: |
Description
the change made in rev [4382] 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.
ie.
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)
#2
@
19 years ago
- Keywords needs-patch added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Eek, good catch. I think there's one other place this has to be fixed. I'll get that taken care of later tonight.
Note: See
TracTickets for help on using
tickets.
sorry, forgot to mention the file it's in:
source:trunk/wp-includes/user.php@4383#L118