Changeset 60299
- Timestamp:
- 06/11/2025 03:27:43 PM (6 weeks ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/author-template.php
r55755 r60299 287 287 return 0; 288 288 } 289 return count_user_posts( $post->post_author, $post->post_type );289 return (int) count_user_posts( $post->post_author, $post->post_type ); 290 290 } 291 291 -
trunk/tests/phpunit/tests/user/getTheAuthorPosts.php
r55754 r60299 43 43 $this->assertSame( 0, get_the_author_posts() ); 44 44 $GLOBALS['post'] = self::$post_id; 45 $this->assert Equals( 1, get_the_author_posts() );45 $this->assertSame( 1, get_the_author_posts() ); 46 46 } 47 47 … … 61 61 $GLOBALS['post'] = $cpt_ids[0]; 62 62 63 $this->assert Equals( 2, get_the_author_posts() );63 $this->assertSame( 2, get_the_author_posts() ); 64 64 65 65 _unregister_post_type( 'wptests_pt' );
Note: See TracChangeset
for help on using the changeset viewer.