mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
Comments: Avoid PHP notice in get_comment_reply_link() for null comment.
If there is no global comment, or the input comment is null, return early to prevent warnings. Fixes #41846 Props birgire, earnjam git-svn-id: https://develop.svn.wordpress.org/trunk@46335 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1646,6 +1646,10 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
|
||||
|
||||
$comment = get_comment( $comment );
|
||||
|
||||
if ( empty( $comment ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( empty( $post ) ) {
|
||||
$post = $comment->comment_post_ID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user