Posts, Post Types: Avoid an extra database query in WP_Post for a negative post ID.
Follow-up to [21559]. Props bor0, akeda, SergeyBiryukov. Fixes #63850. Built from https://develop.svn.wordpress.org/trunk@60654 git-svn-id: http://core.svn.wordpress.org/trunk@59990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -233,7 +233,7 @@ final class WP_Post {
|
||||
global $wpdb;
|
||||
|
||||
$post_id = (int) $post_id;
|
||||
if ( ! $post_id ) {
|
||||
if ( $post_id <= 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.9-alpha-60653';
|
||||
$wp_version = '6.9-alpha-60654';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user