WordPress.org

Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #44977


Ignore:
Timestamp:
09/23/2018 12:47:02 PM (15 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44977

    • Property Component changed from General to Options, Meta APIs
    • Property Summary changed from Transient fill fail delete itself if it's timeout option is absolete to Transient fill fail delete to itself if it's timeout option is missing
  • Ticket #44977 – Description

    initial v2  
    11Just faced this issue - for some reason, the transient was not deleting itself. While checking the DB, the option with the transient was there, while the timeout option was missing (probably a glitch while saving to DB).
    22Now, if you check get_transient() in option.php (quick link https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-includes/option.php#L0 ) you can see that these are deleted only if both exist and both pass the test:
    3 
     3{{{
    44[...]
    55 if ( false !== $timeout && $timeout < time() ) { DELETING TRANSIENT}
    66[...]
    7 
     7}}}
    88Otherwise transient will hang... forever. This should be tuned up so it also checks that these options exist, and delete transient if timeout is absolete.