Make WordPress Core

Changeset 28424


Ignore:
Timestamp:
05/15/2014 06:10:21 AM (12 years ago)
Author:
wonderboymusic
Message:

Eliminate the use of extract() in wp_validate_auth_cookie().

Don't do anything fancy here, just set the 4 returned properties to variables. This function is semi-important.

See #22400.

File:
1 edited

Legend:

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

    r28053 r28424  
    609609        }
    610610
    611         extract($cookie_elements, EXTR_OVERWRITE);
    612 
    613         $expired = $expiration;
     611        $scheme = $cookie_elements['scheme'];
     612        $username = $cookie_elements['username'];
     613        $hmac = $cookie_elements['hmac'];
     614        $expired = $expiration = $cookie_elements['expiration'];
    614615
    615616        // Allow a grace period for POST and AJAX requests
    616         if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] )
     617        if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
    617618                $expired += HOUR_IN_SECONDS;
     619        }
    618620
    619621        // Quick check to see if an honest cookie has expired
    … …  
    660662        }
    661663
    662         if ( $expiration < time() ) // AJAX/POST grace period set above
     664        if ( $expiration < time() ) {// AJAX/POST grace period set above
    663665                $GLOBALS['login_grace_period'] = 1;
     666        }
    664667
    665668        /**
Note: See TracChangeset for help on using the changeset viewer.