From d6352c544b717bac98ee05ed0e9871fc779fbb62 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 11 Feb 2020 20:53:40 +0000 Subject: [PATCH] Coding Standards: Use a strict `in_array()` check for reserved names of user data items in `wp_user_personal_data_exporter()`. Props azaozz. Fixes #47509. git-svn-id: https://develop.svn.wordpress.org/trunk@47277 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 5e0d238eeb..18fd0346ef 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -2942,7 +2942,7 @@ function wp_register_user_personal_data_exporter( $exporters ) { * @since 5.4.0 Added 'Community Events Location' group to the export data. * @since 5.4.0 Added 'Session Tokens' group to the export data. * - * @param string $email_address The users email address. + * @param string $email_address The user's email address. * @return array An array of personal data. */ function wp_user_personal_data_exporter( $email_address ) { @@ -3010,7 +3010,7 @@ function wp_user_personal_data_exporter( $email_address ) { $reserved_names = array_values( $user_props_to_export ); /** - * Filter to extend the Users profile data for the privacy exporter. + * Filter to extend the user's profile data for the privacy exporter. * * @since 5.4.0 * @@ -3031,7 +3031,7 @@ function wp_user_personal_data_exporter( $email_address ) { $extra_data = array_filter( $_extra_data, function( $item ) use ( $reserved_names ) { - return ! in_array( $item['name'], $reserved_names ); + return ! in_array( $item['name'], $reserved_names, true ); } );