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
This commit is contained in:
Dion Hulse 2010-02-25 07:56:25 +00:00
parent 212cd616cb
commit 922e3e828f
1 changed files with 2 additions and 0 deletions

View File

@ -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) )