WordPress.org

Make WordPress Core

Changeset 14309


Ignore:
Timestamp:
04/29/2010 08:19:47 PM (8 years ago)
Author:
ryan
Message:

Always replace dashes with underscores for keys in get_user_option().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/user.php

    r14307 r14309  
    239239    if ( empty($user) ) {
    240240        $user = wp_get_current_user();
    241         // Keys used as object vars cannot have dashes.
    242         $key = str_replace('-', '_', $option);
    243241    } else {
    244242        $user = get_userdata($user);
    245         $key = $option;
    246     }
     243    }
     244
     245    // Keys used as object vars cannot have dashes.
     246    $key = str_replace('-', '_', $option);
    247247
    248248    if ( isset( $user->{$wpdb->prefix . $key} ) ) // Blog specific
Note: See TracChangeset for help on using the changeset viewer.