Changeset 60654
- Timestamp:
- 08/20/2025 02:59:41 PM (7 weeks ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-post.php
r59816 r60654 234 234 235 235 $post_id = (int) $post_id; 236 if ( ! $post_id) {236 if ( $post_id <= 0 ) { 237 237 return false; 238 238 } -
trunk/tests/phpunit/tests/post/wpPost.php
r49603 r60654 43 43 44 44 /** 45 * @ticket 63850 46 */ 47 public function test_get_instance_should_not_perform_database_query_for_negative_number() { 48 $num_queries = get_num_queries(); 49 $found = WP_Post::get_instance( -self::$post_id ); 50 51 $this->assertSame( $num_queries, get_num_queries() ); 52 } 53 54 /** 45 55 * @ticket 37738 46 56 */
Note: See TracChangeset for help on using the changeset viewer.