Make WordPress Core

Opened 2 years ago

Closed 19 months ago

Last modified 19 months ago

#62316 closed defect (bug) (fixed)

strict comparison should be added to check the compare in wp-include comment.php

Reported by: deepakrohilla Owned by: SergeyBiryukov
Priority: normal Milestone: 6.8
Component: General Version:
Severity: normal Keywords: has-patch
Cc: Focuses: coding-standards

Description

A strict comparison should be added in the pingback function within wp-includes/comment.php to ensure accurate ID matching. The url_to_postid function is used to fetch the ID and returns an integer value, and $post->ID also returns an integer. To improve precision, a strict comparison should be used when comparing these integer values.
and also in multiple palaces in comment.php strict comparison should be added.

Change History (8)

​@narenin commented on ​PR #7669:


2 years ago
#2

@deepakrohillas The PR looks good to me.

#3 @SergeyBiryukov
22 months ago

  • Focuses coding-standards added
  • Milestone Awaiting Review → 6.8
  • Owner changed from deepakrohilla to SergeyBiryukov
  • Status assigned → reviewing

#4 @SergeyBiryukov
22 months ago

In 59556:

Coding Standards: Use strict comparison in wp_handle_comment_submission().

Follow-up to [549], [1985], [2464], [2556], [2558], [34799], [40667].

Props deepakrohilla, narenin.
See #62316.

This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.


19 months ago

This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.


19 months ago

#7 @SergeyBiryukov
19 months ago

  • Resolution → fixed
  • Status reviewing → closed

Thanks for the ticket! Closing as fixed in [59556], [59827], and [59887].

​@SergeyBiryukov commented on ​PR #7669:


19 months ago
#8

Thanks for the PR! Merged in r59556, r59827, and r59887.

Note: See TracTickets for help on using tickets.