From 0c0e39d8bf86811588dd082142aee112ad4fee77 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 21 Aug 2020 01:13:05 +0000 Subject: [PATCH] Privacy: Avoid a PHP 7.4 notice in `WP_Privacy_Policy_Content::text_change_check()`. When iterating over the items stored in '_wp_suggested_privacy_policy_content` meta value for the Privacy Policy page, make sure the item is an array before accessing its properties. Props treibstoff. Fixes #51084. Built from https://develop.svn.wordpress.org/trunk@48836 git-svn-id: http://core.svn.wordpress.org/trunk@48598 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-privacy-policy-content.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-privacy-policy-content.php b/wp-admin/includes/class-wp-privacy-policy-content.php index 676d5b6736..dd704bdecf 100644 --- a/wp-admin/includes/class-wp-privacy-policy-content.php +++ b/wp-admin/includes/class-wp-privacy-policy-content.php @@ -87,7 +87,7 @@ final class WP_Privacy_Policy_Content { // Remove the extra values added to the meta. foreach ( $old as $key => $data ) { - if ( ! empty( $data['removed'] ) ) { + if ( ! is_array( $data ) || ! empty( $data['removed'] ) ) { unset( $old[ $key ] ); continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5d76ab091b..1b30830fed 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48835'; +$wp_version = '5.6-alpha-48836'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.