WordPress.org

Making WordPress.org

Changeset 2338


Ignore:
Timestamp:
01/20/2016 03:37:04 PM (2 years ago)
Author:
stephdau
Message:

WordPress.org SSO: adding an ! empty() test to avoid an undefined index warning.

props ocean90

See #1524

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/wporg-sso/class-wporg-sso.php

    r2336 r2338  
    9797        protected function _get_safer_redirect_to() {
    9898            // Setup a default redirect to URL, with a safe version to only change if validation succeeds below.
    99             $redirect_to = in_array( $_GET['action'], array( 'logout', 'loggedout' ) ) ? '/loggedout/' : 'https://wordpress.org/';
     99            $redirect_to = ! empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'logout', 'loggedout' ) ) ? '/loggedout/' : 'https://wordpress.org/';
    100100           
    101101            if ( ! empty( $_REQUEST['redirect_to'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.