From f1ea02c64e78b7e1e89911dd16bad0046a46c24f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 5 Nov 2024 23:09:20 +0000 Subject: [PATCH] Coding Standards: Use `WP_User_Query::get_results()` instead of a private property. This resolves an issue where the private property `WP_User_Query::$results` is accessed directly in `WP_REST_Users_Controller::get_items()` instead of via the `::get_results()` method. Follow-up to [38832]. Props justlevine. See #52217. Built from https://develop.svn.wordpress.org/trunk@59357 git-svn-id: http://core.svn.wordpress.org/trunk@58743 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-users-controller.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index c8d9b11a11..84bcea052c 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -349,7 +349,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { $users = array(); - foreach ( $query->results as $user ) { + foreach ( $query->get_results() as $user ) { $data = $this->prepare_item_for_response( $user, $request ); $users[] = $this->prepare_response_for_collection( $data ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 77d58608af..c517f587b8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59356'; +$wp_version = '6.8-alpha-59357'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.