Changeset 46335
- Timestamp:
- 09/27/2019 02:45:49 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r46090 r46335 1646 1646 1647 1647 $comment = get_comment( $comment ); 1648 1649 if ( empty( $comment ) ) { 1650 return; 1651 } 1648 1652 1649 1653 if ( empty( $post ) ) { -
trunk/tests/phpunit/tests/comment/getCommentReplyLink.php
r45787 r46335 67 67 $this->assertContains( $expected_url, $comment_reply_link ); 68 68 } 69 70 /** 71 * @ticket 41846 72 */ 73 public function test_should_return_null_when_depth_less_than_max_depth_and_comment_null_and_no_current_global_comment() { 74 75 // Let max depth be greater than depth and depth be non-zero. 76 $args = array( 77 'depth' => 1, 78 'max_depth' => 2, 79 ); 80 81 // Make sure there's no global comment object. 82 add_filter( 'get_comment', '__return_null' ); 83 84 $actual = get_comment_reply_link( $args ); 85 86 $this->assertNull( $actual ); 87 } 88 69 89 }
Note: See TracChangeset
for help on using the changeset viewer.