WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5834 closed defect (bug) (fixed)

Errneous variable name in comments-template.php

Reported by: reinkim Owned by:
Milestone: 2.5 Priority: normal
Severity: critical Version:
Component: General Keywords:
Focuses: Cc:

Description

in [6716],

	585 function pings_open( $post_id=NULL ) { 
 	586 
 	587	    $_post = get_post($post_id); 
 	588	 
 	589	    $open = ( 'open' == $post->ping_status ); 
 	590	    return apply_filters( 'pings_open', $open, $post_id ); 

$post in line 585 should be $_post.

This variable lookup-failure causes trackback failure

Change History (4)

comment:1 reinkim6 years ago

This function is located in wp-includes/comment-template.php

comment:2 DD326 years ago

$post in line 585 should be $_post.

Looking at that, Its supposed to be $post_id, As in, You pass the post id in, then it fetches that post, and checks the ping status.

comment:3 ryan6 years ago

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

(In [6802]) Fix variable name typo. Props reinkim. fixes #5834

comment:4 ryan6 years ago

  • Milestone changed from 2.6 to 2.5

If get_post() is passed a null post_id it will use the global post.

Note: See TracTickets for help on using tickets.