Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/23/2013 07:00:11 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Replace generic stdClass usages with correct object types.

Fixes debug notices with bbp_get_displayed_user_field() when requesting non-existing fields or when there is no displayed user, by allowing the magic get() methods of the WP_User class to bail if the field is not set.

Also prevents similar issues with main query loops. Fixes #2359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/users/functions.php

    r4995 r4996  
    869869
    870870        if ( $new_email['hash'] === $_GET['newuseremail'] ) {
    871             $user             = new stdClass();
     871            $user             = new WP_User();
    872872            $user->ID         = $user_id;
    873873            $user->user_email = esc_html( trim( $new_email['newemail'] ) );
Note: See TracChangeset for help on using the changeset viewer.