Make WordPress Core


Ignore:
Timestamp:
09/16/2013 05:42:49 PM (11 years ago)
Author:
nacin
Message:

Always pass integer expirations to cache backends.

props SergeyBiryukov, andreasnrb.
fixes #25308.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r25350 r25451  
    491491function set_transient( $transient, $value, $expiration = 0 ) {
    492492    $value = apply_filters( 'pre_set_transient_' . $transient, $value );
     493    $expiration = (int) $expiration;
    493494
    494495    if ( wp_using_ext_object_cache() ) {
     
    10501051function set_site_transient( $transient, $value, $expiration = 0 ) {
    10511052    $value = apply_filters( 'pre_set_site_transient_' . $transient, $value );
     1053    $expiration = (int) $expiration;
    10521054
    10531055    if ( wp_using_ext_object_cache() ) {
Note: See TracChangeset for help on using the changeset viewer.