We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d7bf5f commit f8b2344Copy full SHA for f8b2344
inc/fragment.php
@@ -400,7 +400,7 @@ public static function get_fragment_from_comment( $my_comment ) {
400
401
public static function get_depth_for_comment( $my_comment ) {
402
$depth = 1;
403
- while ( 0 < $my_comment->comment_parent ) {
+ while ( $my_comment && 0 < $my_comment->comment_parent ) {
404
$depth = $depth + 1;
405
$my_comment = get_comment( $my_comment->comment_parent );
406
}
0 commit comments