* 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.


Built from https://develop.svn.wordpress.org/trunk@25397


git-svn-id: http://core.svn.wordpress.org/trunk@25328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2013-09-12 07:17:11 +00:00
parent 641d3b2560
commit 13d5ff7090

View File

@ -1476,7 +1476,8 @@ function update_posts_count( $deprecated = '' ) {
function wpmu_log_new_registrations( $blog_id, $user_id ) {
global $wpdb;
$user = get_userdata( (int) $user_id );
$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')) );
if ( $user )
$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')) );
}
/**