Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 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:


in [6716],

	585 function pings_open( $post_id=NULL ) { 
 	587	    $_post = get_post($post_id); 
 	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)

#1 @reinkim
8 years ago

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

#2 @DD32
8 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.

#3 @ryan
8 years ago

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

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

#4 @ryan
8 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.