From 922e3e828fab9ab5e159116f7f648d07b136dada Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 25 Feb 2010 07:56:25 +0000 Subject: [PATCH] Prefer $comment::comment_post_ID over $post global. Fixes #12217 git-svn-id: https://develop.svn.wordpress.org/trunk@13396 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment-template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 993293408c..8e171bd414 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1049,6 +1049,8 @@ function get_comment_reply_link($args = array(), $comment = null, $post = null) extract($args, EXTR_SKIP); $comment = get_comment($comment); + if ( empty($post) ) + $post = $comment->comment_post_ID; $post = get_post($post); if ( !comments_open($post->ID) )