Changeset 34454
- Timestamp:
- 09/23/2015 02:08:47 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r34308 r34454 434 434 global $comment_alt, $comment_depth, $comment_thread_alt; 435 435 436 $comment = get_comment($comment_id);437 438 436 $classes = array(); 437 438 $comment = get_comment( $comment_id ); 439 if ( ! $comment ) { 440 return $classes; 441 } 439 442 440 443 // Get the comment type (comment, trackback), -
trunk/tests/phpunit/tests/comment/getCommentClass.php
r34453 r34454 37 37 $this->assertContains( 'bar', $classes ); 38 38 } 39 40 /** 41 * @ticket 33947 42 */ 43 public function test_should_return_an_empty_array_for_invalid_comment_id() { 44 $this->assertSame( array(), get_comment_class( 'foo', 12345 ) ); 45 } 39 46 }
Note: See TracChangeset
for help on using the changeset viewer.