diff --git a/wp-includes/meta.php b/wp-includes/meta.php index 8833d3e987..b7ea2af9f4 100644 --- a/wp-includes/meta.php +++ b/wp-includes/meta.php @@ -567,12 +567,12 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) { function get_metadata_by_mid( $meta_type, $meta_id ) { global $wpdb; - if ( ! $meta_type || ! is_numeric( $meta_id ) ) { + if ( ! $meta_type || ! is_numeric( $meta_id ) || floor( $meta_id ) != $meta_id ) { return false; } - $meta_id = absint( $meta_id ); - if ( ! $meta_id ) { + $meta_id = intval( $meta_id ); + if ( $meta_id <= 0 ) { return false; } @@ -611,12 +611,12 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key = global $wpdb; // Make sure everything is valid. - if ( ! $meta_type || ! is_numeric( $meta_id ) ) { + if ( ! $meta_type || ! is_numeric( $meta_id ) || floor( $meta_id ) != $meta_id ) { return false; } - $meta_id = absint( $meta_id ); - if ( ! $meta_id ) { + $meta_id = intval( $meta_id ); + if ( $meta_id <= 0 ) { return false; } @@ -702,12 +702,12 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) { global $wpdb; // Make sure everything is valid. - if ( ! $meta_type || ! is_numeric( $meta_id ) ) { + if ( ! $meta_type || ! is_numeric( $meta_id ) || floor( $meta_id ) != $meta_id ) { return false; } - $meta_id = absint( $meta_id ); - if ( ! $meta_id ) { + $meta_id = intval( $meta_id ); + if ( $meta_id <= 0 ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2193f2a468..5d688434f0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38698'; +$wp_version = '4.7-alpha-38699'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.