Make WordPress Core

Changeset 21226


Ignore:
Timestamp:
07/07/2012 04:23:49 AM (12 years ago)
Author:
dd32
Message:

WP_HTTP: Respect that some cookies do not have an expiration time, this is a valid use-case that WP_HTTP_Cookie::test() should not discard, a non-existant expiration date simply means to let it expire at the end of the session. Props mailnew2ster. Fixes #14191

File:
1 edited

Legend:

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

    r21225 r21226  
    15511551    function test( $url ) {
    15521552        // Expires - if expired then nothing else matters
    1553         if ( time() > $this->expires )
     1553        if ( isset( $this->expires ) && time() > $this->expires )
    15541554            return false;
    15551555
Note: See TracChangeset for help on using the changeset viewer.