[wp-trac] [WordPress Trac] #44723: The user ID in a `WP_User_Request` is not an integer as stated

WordPress Trac noreply at wordpress.org
Fri Aug 3 21:00:02 UTC 2018


#44723: The user ID in a `WP_User_Request` is not an integer as stated
--------------------------+-----------------------
 Reporter:  desrosj       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.9.9
Component:  Privacy       |    Version:  4.9.6
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 Discovered this while debugging something in #43985. The value of
 `WP_User_Request->user_id` is a string, not an integer as stated by the
 inline documentation. This was causing some unexpected behavior in
 `get_user_locale()`, which performs a strict comparison for `0` and was
 causing the condition to incorrectly evaluate as `false`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44723>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list