[wp-trac] [WordPress Trac] #44697: Argument type does not match: user.php

WordPress Trac noreply at wordpress.org
Thu Aug 2 15:28:55 UTC 2018


#44697: Argument type does not match: user.php
-------------------------------------+-------------------------------
 Reporter:  subrataemfluence         |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.0
Component:  Users                    |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  coding-standards
-------------------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => has-patch needs-refresh
 * milestone:  Awaiting Review => 5.0


Comment:

 Hi @subrataemfluence, thanks for the ticket!

 The existing type is correct, `$for_user_id` should be an integer, not a
 string.

 That said, it could use a better default value, i.e. `0` instead of an
 empty string. Given the non-strict check a few lines below, changing it to
 `0` should not affect the logic.

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


More information about the wp-trac mailing list