[wp-trac] [WordPress Trac] #49239: Prefer strict PHP comparisons over loose PHP comparisons (batch 2)

WordPress Trac noreply at wordpress.org
Sun Feb 2 06:52:33 UTC 2020


#49239: Prefer strict PHP comparisons over loose PHP comparisons (batch 2)
-------------------------+-------------------------------
 Reporter:  pikamander2  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  coding-standards
-------------------------+-------------------------------

Comment (by pikamander2):

 @mukesh27 - Sorry for the late reply.

 I was hesitant to replace the loose comparisons that involved things like
 '0' or 0 because that would change the resulting logic when comparing it
 to things like null or false.

 For backwards compatibility reasons, I think it would be best to do the
 easy ones first and then revisit comparisons like the one you mentioned
 later on.

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


More information about the wp-trac mailing list