[wp-trac] [WordPress Trac] #28315: update_user_meta() updates user with ID1 if WP_Error is passed as first argument

WordPress Trac noreply at wordpress.org
Wed Jul 30 13:01:10 UTC 2014


#28315: update_user_meta() updates user with ID1 if WP_Error is passed as first
argument
-------------------------------------+-----------------------
 Reporter:  javorszky                |       Owner:
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.0
Component:  Options, Meta APIs       |     Version:  3.9.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------

Comment (by SergeyBiryukov):

 Replying to [comment:13 georgestephanis]:
 > Someone could inadvertently pass in a string containing the number --
 some ways of getting a user id out of the db or from inputs could be
 strings.

 `is_numeric()` would allow for that, unlike `is_int()`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28315#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list