WordPress.org

Make WordPress Core

Ticket #24992: 24992.patch

File 24992.patch, 582 bytes (added by SergeyBiryukov, 7 years ago)
  • src/wp-admin/includes/user.php

     
    195195 * @since 2.0.5
    196196 *
    197197 * @param int $user_id User ID.
    198  * @return object WP_User object with user data.
     198 * @return bool|WP_User False on failure, WP_User object on success.
    199199 */
    200200function get_user_to_edit( $user_id ) {
    201201        $user = get_userdata( $user_id );
    202202
    203         $user->filter = 'edit';
     203        if ( $user )
     204                $user->filter = 'edit';
    204205
    205206        return $user;
    206207}