Opened 14 years ago
Closed 11 years ago
#23881 closed defect (bug) (duplicate)
get_transient() could delete transient timeout options in an unexpected way
| Reported by: | tenpura | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Options, Meta APIs | Version: | 2.8 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
get_transient() could delete transient timeout options if a given transient name has the "timeout_" prefix.
To reproduce:
set_transient( 'test', 'test', 60*60 ); get_transient( 'timeout_test' ); // will delete the _transient_timeout_test option
Solution:
Check if get_option( $transient_timeout ) is not returning false.
if ( false !== get_option( $transient_timeout ) && get_option( $transient_timeout ) < time() ) {
Attachments (3)
Change History (11)
#1
@
14 years ago
- Summary get_transient() could delete transient timeout options → get_transient() could delete transient timeout options in an unexpected way
#4
@
13 years ago
- Milestone 3.6 → Future Release
- Severity normal → minor
Punting this until it has unit tests.
This ticket was mentioned in IRC in #wordpress-dev by ericmann. View the logs.
13 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related: [10603], [10665]