After [34015], handle orphaned comments in the Dashboard comments widget. Pass full $comment versus just passing the comment ID when possible.

See #33710.


git-svn-id: https://develop.svn.wordpress.org/trunk@34038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-11 05:55:27 +00:00
parent 3f557063be
commit 4cd30ede79
2 changed files with 28 additions and 12 deletions

View File

@@ -1362,7 +1362,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
}
$comment = get_comment( $comment_id );
if ( empty( $comment ) )
if ( empty( $comment ) || empty( $comment->comment_post_ID ) )
return false;
$post = get_post( $comment->comment_post_ID );
@@ -1821,7 +1821,7 @@ function wp_verify_nonce( $nonce, $action = -1 ) {
* @param string|int $action The nonce action.
* @param WP_User $user The current user object.
* @param string $token The user's session token.
*/
*/
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
// Invalid nonce