Make WordPress Core

Changeset 10565


Ignore:
Timestamp:
02/12/2009 08:44:34 PM (16 years ago)
Author:
ryan
Message:

Handle empty pairs in cookies. Props DD32. fixes #9101

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r10563 r10565  
    13761376            $this->name  = $name;
    13771377            $this->value = urldecode( $value );
    1378             array_shift( $pairs );
     1378            array_shift( $pairs ); //Removes name=value from items.
    13791379           
    13801380            // Set everything else as a property
    13811381            foreach ( $pairs as $pair ) {
     1382                if ( empty($pair) ) //Handles the cookie ending in ; which results in a empty final pair
     1383                    continue;
    13821384                list( $key, $val ) = explode( '=', $pair );
    13831385                $key = strtolower( trim( $key ) );
Note: See TracChangeset for help on using the changeset viewer.