WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (17 months ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.

See #47632.

File:
1 edited

Legend:

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

    r45568 r45590  
    218218
    219219        // Headers
    220         $cc = $bcc = $reply_to = array();
     220        $cc       = array();
     221        $bcc      = array();
     222        $reply_to = array();
    221223
    222224        if ( empty( $headers ) ) {
     
    596598     */
    597599    function wp_validate_auth_cookie( $cookie = '', $scheme = '' ) {
    598         if ( ! $cookie_elements = wp_parse_auth_cookie( $cookie, $scheme ) ) {
     600        $cookie_elements = wp_parse_auth_cookie( $cookie, $scheme );
     601        if ( ! $cookie_elements ) {
    599602            /**
    600603             * Fires if an authentication cookie is malformed.
     
    610613        }
    611614
    612         $scheme   = $cookie_elements['scheme'];
    613         $username = $cookie_elements['username'];
    614         $hmac     = $cookie_elements['hmac'];
    615         $token    = $cookie_elements['token'];
    616         $expired  = $expiration = $cookie_elements['expiration'];
     615        $scheme     = $cookie_elements['scheme'];
     616        $username   = $cookie_elements['username'];
     617        $hmac       = $cookie_elements['hmac'];
     618        $token      = $cookie_elements['token'];
     619        $expired    = $cookie_elements['expiration'];
     620        $expiration = $cookie_elements['expiration'];
    617621
    618622        // Allow a grace period for POST and Ajax requests
     
    10371041        $scheme = apply_filters( 'auth_redirect_scheme', '' );
    10381042
    1039         if ( $user_id = wp_validate_auth_cookie( '', $scheme ) ) {
     1043        $user_id = wp_validate_auth_cookie( '', $scheme );
     1044        if ( $user_id ) {
    10401045            /**
    10411046             * Fires before the authentication redirect.
     
    13811386
    13821387        // In php 5 parse_url may fail if the URL query part contains http://, bug #38143
    1383         $test = ( $cut = strpos( $location, '?' ) ) ? substr( $location, 0, $cut ) : $location;
     1388        $cut  = strpos( $location, '?' );
     1389        $test = $cut ? substr( $location, 0, $cut ) : $location;
    13841390
    13851391        // @-operator is used to prevent possible warnings in PHP < 5.3.3.
Note: See TracChangeset for help on using the changeset viewer.