[wp-trac] Re: [WordPress Trac] #9638: add_magic_quotes() fails on
objects
WordPress Trac
wp-trac at lists.automattic.com
Sun Apr 26 18:35:26 GMT 2009
#9638: add_magic_quotes() fails on objects
--------------------------+-------------------------------------------------
Reporter: misterbisson | Owner: anonymous
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: General | Version: 2.7
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by misterbisson):
Agreed, it _should_. It's not getting serialized because wp_update_user()
doesn't bother:
{{{
// First, get all of the original fields
$user=get_userdata($ID);
// Escape data pulled from DB.
$user=add_magic_quotes(get_object_vars($user));
}}}
If $user contains an object somewhere, it gets blindly passed to
add_magic_quotes().
wp_update_user() clearly needs a fix (thus #9640), but add_magic_quotes()
also needs some bulletproofing.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9638#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list