[wp-trac] [WordPress Trac] #62276: class-wp-user.php can throw a warning for trim() when $value is null

WordPress Trac noreply at wordpress.org
Tue Oct 22 11:58:46 UTC 2024


#62276: class-wp-user.php can throw a warning for trim() when $value is null
-------------------------+-------------------------------------------------
 Reporter:  heuptasje    |       Owner:  heuptasje
     Type:  defect       |      Status:  assigned
  (bug)                  |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  coding-standards, php-
                         |  compatibility
-------------------------+-------------------------------------------------

Comment (by heuptasje):

 Replying to [comment:2 knutsp]:
 > If `$value` is null when docs day `@param string|int` then the error is
 correct. Why silence it?

 I don't think we should allow it to go through to a function that will
 throw a deprecation error either. I'd say we'd rather have it return false
 then.

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


More information about the wp-trac mailing list