WordPress.org

Make WordPress Core

Changeset 13584


Ignore:
Timestamp:
03/04/2010 06:38:39 PM (8 years ago)
Author:
westi
Message:

Fix some notices in wp-signup.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-signup.php

    r13384 r13584  
    99require_once( ABSPATH . WPINC . '/registration.php' );
    1010
    11 if ( is_array( get_site_option( 'illegal_names' )) && $_GET[ 'new' ] != '' && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
     11if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
    1212    wp_redirect( "http://{$current_site->domain}{$current_site->path}" );
    1313    die();
     
    234234    else
    235235        $signup[ 'blog' ] = 'checked="checked"';
     236       
     237    //TODO - This doesn't seem to do anything do we really need it?
     238    $signup['user'] = isset( $signup['user'] ) ? $signup['user'] : '';
    236239
    237240    // allow definition of default variables
     
    394397    echo sprintf( __( "You must first <a href=\"%s\">login</a>, and then you can create a new site."), $login_url );
    395398} else {
    396     switch ($_POST['stage']) {
     399    $stage = isset( $_POST['stage'] ) ?  $_POST['stage'] : 'default';
     400    switch ( $stage ) {
    397401        case 'validate-user-signup' :
    398402            if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' )
     
    410414            validate_another_blog_signup();
    411415            break;
     416        case 'default':
    412417        default :
    413             $user_email = $_POST[ 'user_email' ];
     418            $user_email = isset( $_POST[ 'user_email' ] ) ? $_POST[ 'user_email' ] : '';
    414419            do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?
    415420            if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
Note: See TracChangeset for help on using the changeset viewer.