Make WordPress Core


Ignore:
Timestamp:
09/12/2013 07:16:30 AM (10 years ago)
Author:
wonderboymusic
Message:
  • Fill in undefined var in Tests_Option_BlogOption
  • Add defined() check for BLOGSUPLOADDIR
  • Suppress deprecated function notices for is_blog_user() and get_dashboard_blog()
  • Check existence of $user in wpmu_log_new_registrations() before arbitrarily making a database query

Fixes all notices in multisite unit tests.

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r25229 r25397  
    14771477    global $wpdb;
    14781478    $user = get_userdata( (int) $user_id );
    1479     $wpdb->insert( $wpdb->registration_log, array('email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) ), 'blog_id' => $blog_id, 'date_registered' => current_time('mysql')) );
     1479    if ( $user )
     1480        $wpdb->insert( $wpdb->registration_log, array('email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) ), 'blog_id' => $blog_id, 'date_registered' => current_time('mysql')) );
    14801481}
    14811482
Note: See TracChangeset for help on using the changeset viewer.