[wp-trac] [WordPress Trac] #32222: Silent error on attempt of user creation
WordPress Trac
noreply at wordpress.org
Fri May 1 11:24:31 UTC 2015
#32222: Silent error on attempt of user creation
--------------------------+-----------------------------
Reporter: psycleuk | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 4.2.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The change from [32307] causes any database inserts or updates to silently
fail if the content length of a column is longer than the database allows.
However in testing we found that creating a user with a long `user_login`
(which is allowed to be up to 60 chars) causes a `user_nicename` to be
automatically generated that is longer than the 50 chars allowed. The
insert simply returns false, and the user_id returned from
`wp_insert_user` is simply 0.
I've not looked but I can see other situations where this silent error
could occur. Would it not be better to return a `WP_Error` of some kind?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32222>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list