Make WordPress Core

Opened 15 months ago

Last modified 15 months ago

#56172 new defect (bug)

Strict comparisons not used.

Reported by: hilayt24's profile hilayt24 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: needs-patch dev-feedback
Focuses: coding-standards Cc:

Description

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 !==).

Change History (1)

#1 @audrasjb
15 months ago

  • Focuses coding-standards added
  • Keywords needs-refresh removed
Note: See TracTickets for help on using tickets.