Make WordPress Core

Ticket #9101: 9101.diff

File 9101.diff, 746 bytes (added by DD32, 16 years ago)
  • wp-includes/http.php

     
    13741374                        $value = substr( $pairs[0], strpos( $pairs[0], '=' ) + 1 );
    13751375                        $this->name  = $name;
    13761376                        $this->value = urldecode( $value );
    1377                         array_shift( $pairs );
     1377                        array_shift( $pairs ); //Removes name=value from items.
    13781378                       
    13791379                        // Set everything else as a property
    13801380                        foreach ( $pairs as $pair ) {
     1381                                if ( empty($pair) ) //Handles the cookie ending in ; which results in a empty final pair
     1382                                        continue;
    13811383                                list( $key, $val ) = explode( '=', $pair );
    13821384                                $key = strtolower( trim( $key ) );
    13831385                                if ( 'expires' == $key )