From 8f5d82df7b0b5b2fbaed8ca4c2ad49876f8175df Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 28 Mar 2019 21:59:52 +0000 Subject: [PATCH] Options, Meta APIs: Ensure the `$object_id` parameter passed to the `delete_{$meta_type}_meta` and `deleted_{$meta_type}_meta` filters is always an integer. Props salcode Fixes #43561 Built from https://develop.svn.wordpress.org/trunk@45064 git-svn-id: http://core.svn.wordpress.org/trunk@44873 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/meta.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/meta.php b/wp-includes/meta.php index 188d12f8c7..2332d9b5af 100644 --- a/wp-includes/meta.php +++ b/wp-includes/meta.php @@ -812,7 +812,7 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) { // Fetch the meta and go on if it's found. if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) { - $object_id = $meta->{$column}; + $object_id = (int) $meta->{$column}; /** This action is documented in wp-includes/meta.php */ do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value ); diff --git a/wp-includes/version.php b/wp-includes/version.php index e9150fb701..aed7f1a2b4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta1-45063'; +$wp_version = '5.2-beta1-45064'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.