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. git-svn-id: https://develop.svn.wordpress.org/trunk@48836 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e87d86b2ae
commit
493a88c666
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user