Make WordPress Core

Changeset 6711 for trunk/wp-login.php


Ignore:
Timestamp:
02/02/2008 06:42:09 PM (16 years ago)
Author:
ryan
Message:

Some notice fixes from Nazgul. fixes #3155

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r6664 r6711  
    175175//
    176176
    177 $action = $_REQUEST['action'];
     177$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
    178178$errors = new WP_Error();
    179179
     
    352352
    353353    // Some parts of this script use the main login form to display a message
    354     if      ( TRUE == $_GET['loggedout'] )          $errors->add('loggedout', __('You are now logged out.'));
    355     elseif  ( 'disabled' == $_GET['registration'] ) $errors->add('registerdiabled', __('User registration is currently not allowed.'));
    356     elseif  ( 'confirm' == $_GET['checkemail'] )    $errors->add('confirm', __('Check your e-mail for the confirmation link.'));
    357     elseif  ( 'newpass' == $_GET['checkemail'] )    $errors->add('newpass', __('Check your e-mail for your new password.'));
    358     elseif  ( 'registered' == $_GET['checkemail'] ) $errors->add('registered', __('Registration complete. Please check your e-mail.'));
     354    if      ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] )         $errors->add('loggedout', __('You are now logged out.'));
     355    elseif  ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) $errors->add('registerdiabled', __('User registration is currently not allowed.'));
     356    elseif  ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] )  $errors->add('confirm', __('Check your e-mail for the confirmation link.'));
     357    elseif  ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] )  $errors->add('newpass', __('Check your e-mail for your new password.'));
     358    elseif  ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] )   $errors->add('registered', __('Registration complete. Please check your e-mail.'));
    359359
    360360    login_header(__('Login'), '', $errors);
     
    362362
    363363<form name="loginform" id="loginform" action="wp-login.php" method="post">
    364 <?php if ( !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>
     364<?php if ( !isset($_GET['checkemail']) || !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>
    365365    <p>
    366366        <label><?php _e('Username') ?><br />
     
    385385
    386386<p id="nav">
    387 <?php if ( in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>
     387<?php if ( isset($_GET['checkemail']) && in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>
    388388<?php elseif (get_option('users_can_register')) : ?>
    389389<a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a> |
Note: See TracChangeset for help on using the changeset viewer.