Make WordPress Core

Opened 5 months ago

Closed 4 days ago

Last modified 4 days ago

#62316 closed defect (bug) (fixed)

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

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

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:


5 months ago
#2

@deepakrohillas The PR looks good to me.

#3 @SergeyBiryukov
3 months ago

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

#4 @SergeyBiryukov
3 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.


2 weeks ago

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


4 days ago

#7 @SergeyBiryukov
4 days ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

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

@SergeyBiryukov commented on PR #7669:


4 days ago
#8

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

Note: See TracTickets for help on using tickets.