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 Built from https://develop.svn.wordpress.org/trunk@46335 git-svn-id: http://core.svn.wordpress.org/trunk@46134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
188416bd55
commit
d4c6ebeb89
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-beta1-46334';
|
||||
$wp_version = '5.3-beta1-46335';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue