#58988 closed enhancement (duplicate)
Coding Standards: Use strict comparison in wp-admin/includes/ajax-actions.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | coding-standards | Cc: |
Description
Coding Standards: Use strict comparison in wp-admin/includes/ajax-actions.php
Attachments (1)
Change History (4)
#1
@
18 months ago
- Keywords needs-patch removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
- Version trunk deleted
Hello,
Thanks for the ticket and patch, but it appears that this issue is already covered by this PR: https://github.com/WordPress/wordpress-develop/pull/3873/files#diff-0654ebf17929e2c6b7aebbbab05808973b621ea19004971c1217f7d2be9f82e8 related to ticket #58831.
Thus I'm closing it as duplicate of #58831.
Pinging @SergeyBiryukov who's kinda coordinating this :)
#2
@
18 months ago
Thanks for the ticket and the patch! As noted above, the PR on the other ticket should already cover this.
Some of these changes would need double-checking, as the values passed in $_GET
or $_POST
arrays are strings, so for example 1 === $_GET['test']
or 1 === $_POST['delete']
might not work as expected.
Some other values are converted to an integer, so this would need an appropriate type adjustment as well:
$thumbnail_id = (int) $_POST['thumbnail_id']; ... if ( '-1' === $thumbnail_id ) { ... }
Patch added. I added strict comparison