[wp-trac] [WordPress Trac] #63445: Replace value casting with ! empty() check for positive value validation

WordPress Trac noreply at wordpress.org
Wed May 14 06:57:49 UTC 2025


#63445: Replace value casting with ! empty() check for positive value validation
--------------------------+-------------------------------
 Reporter:  dilipbheda    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  coding-standards
--------------------------+-------------------------------

Comment (by swissspidy):

 I would advise against introducing more usages of `empty()`, see for
 example https://localheinz.com/articles/2023/05/10/avoiding-empty-in-php/

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


More information about the wp-trac mailing list