[wp-trac] [WordPress Trac] #58904: delete_expired_transients() does not delete expired transient created with a false/empty transient name

WordPress Trac noreply at wordpress.org
Tue Jul 25 19:40:24 UTC 2023


#58904: delete_expired_transients() does not delete expired transient created with
a false/empty transient name
--------------------------------+-----------------------------
 Reporter:  jeremyescott        |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  trunk
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 Due to a typo/bug in my plugin code, I found that WordPress accepts empty
 strings, null, and false for the $transient arg, aka: the transient name,
 in set_transient() function which creates transients in the options
 database with values of simply `_transient_` and `_transient_timeout_`.

 The empty string transient is not be cleaned up by the
 `delete_expired_transients()` routine.

 Related is patch #58903, though I do not feel comfortable making a patch
 for this issue as the fix requires has SQL calls.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58904>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list