#58056 closed defect (bug) (fixed)
Fix non-strict equality check in /wp-admin/users.php Line No 148
| Reported by: | moinrrahmed | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.3 |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | coding-standards |
Description
A non-strict equality check issue on line 148 of the WordPress file /wp-admin/users.php. The original code uses the "==" operator instead of the "===" operator, which can lead to unexpected behavior in certain cases. The updated code uses the "===" operator for strict equality checking. This improves the security and stability of the WordPress core codebase.
Change History (5)
This ticket was mentioned in PR #4288 on WordPress/wordpress-develop by @moinrrahmed.
3 years ago
#1
- Keywords has-patch added; needs-patch removed
#2
@
3 years ago
- Component General → Users
- Milestone Awaiting Review → 6.3
- Summary Fix non-strict equality check in /w-admin/users.php Line No 148 → Fix non-strict equality check in /wp-admin/users.php Line No 148
#3
@
3 years ago
- Keywords commit added
- Version trunk
Hello @moinrrahmed, welcome to Trac and thanks for the ticket,
The change looks good to me, as $id is actually casted into an integer a few lines above this condition.
@audrasjb commented on PR #4288:
3 years ago
#5
Committed in https://core.trac.wordpress.org/changeset/55622
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This PR fixes a non-strict equality check issue on line 148 of the WordPress file /wp-admin/users.php. The original code uses the "==" operator instead of the "===" operator, which can lead to unexpected behavior in certain cases. The updated code uses the "===" operator for strict equality checking. This improves the security and stability of the WordPress core codebase.
Trac ticket: https://core.trac.wordpress.org/ticket/58056