Skip to:
Content

BuddyPress.org

Ticket #8455: 8455.patch

File 8455.patch, 1.0 KB (added by needle, 5 years ago)

Patch for #8455

  • src/bp-xprofile/classes/class-bp-xprofile-profiledata.php

     
    357357                                $cache_key = "{$user_id}:{$field_id}";
    358358
    359359                                // If a value was found, cache it.
    360                                 if ( isset( $queried_data[ $field_id ] ) ) {
     360                                if ( isset( $queried_data[ $field_id ] ) && ! isset( $field_type_objects[ $field_id ]->wp_user_key ) ) {
    361361                                        wp_cache_set( $cache_key, $queried_data[ $field_id ], 'bp_xprofile_data' );
    362362
    363363                                // If no value was found, cache an empty item
     
    373373                                                $d->table_name = $meta['table_name'];
    374374
    375375                                        } else {
    376                                                 $d->id    = '';
    377                                                 $d->value = '';
     376                                                $d->id           = '';
     377                                                $d->value        = '';
     378                                                $d->table_name   = '';
    378379                                        }
    379380
    380                                         $d->table_name   = '';
    381381                                        $d->user_id      = $user_id;
    382382                                        $d->field_id     = $field_id;
    383383                                        $d->last_updated = '';