[wp-trac] [WordPress Trac] #44977: Transient fill fail delete to itself if it's timeout option is missing (was: Transient fill fail delete itself if it's timeout option is absolete)
WordPress Trac
noreply at wordpress.org
Sun Sep 23 12:47:02 UTC 2018
#44977: Transient fill fail delete to itself if it's timeout option is missing
--------------------------------+------------------------------
Reporter: nlozovan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------------+------------------------------
Changes (by SergeyBiryukov):
* component: Cache API => Options, Meta APIs
Old description:
> Just 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).
> Now, 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:
>
> [...]
> if ( false !== $timeout && $timeout < time() ) { DELETING TRANSIENT}
> [...]
>
> Otherwise transient will hang... forever. This should be tuned up so it
> also checks that these options exist, and delete transient if timeout is
> absolete.
New description:
Just 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).
Now, 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:
{{{
[...]
if ( false !== $timeout && $timeout < time() ) { DELETING TRANSIENT}
[...]
}}}
Otherwise transient will hang... forever. This should be tuned up so it
also checks that these options exist, and delete transient if timeout is
absolete.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44977#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list