[wp-trac] [WordPress Trac] #56172: Strict comparisons not used.

WordPress Trac noreply at wordpress.org
Fri Jul 8 05:04:18 UTC 2022


#56172: Strict comparisons not used.
-------------------------+-------------------------------------------------
 Reporter:  hilayt24     |      Owner:  (none)
     Type:  defect       |     Status:  new
  (bug)                  |
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  needs-patch needs-refresh dev-
  Focuses:               |  feedback
-------------------------+-------------------------------------------------
 On going through the core files, I observed that in many places strict
 comparison is not used. After that, I ran the code through the WPCS and
 also got the warnings for the same. Though it does not affect the flow of
 the site, it should be used.

 Few exampals are:

 1 options-general.php

 {{{
  215 | WARNING | Found: ==. Use strict comparisons (=== or !==).
  393 | WARNING | Found: ==. Use strict comparisons (=== or !==).
 }}}

 2 sites.php


 {{{
  105 | WARNING | Found: ==. Use strict comparisons (=== or !==).
  145 | WARNING | Found: !=. Use strict comparisons (=== or !==).
  145 | WARNING | Found: !=. Use strict comparisons (=== or !==).
  157 | WARNING | Found: ==. Use strict comparisons (=== or !==).
  185 | WARNING | Found: !=. Use strict comparisons (=== or !==).
  185 | WARNING | Found: !=. Use strict comparisons (=== or !==).
 }}}

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


More information about the wp-trac mailing list