Make WordPress Core


Ignore:
Timestamp:
02/07/2014 08:13:37 AM (12 years ago)
Author:
nacin
Message:

Use a float for last_changed microtime cache values.

microtime() by default returns a string with a space, which isn't allowed for keys in some cache backends.

props _jameslee, drozdz.
fixes #27000. see #23448.

File:
1 edited

Legend:

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

    r27108 r27115  
    13141314    $last_changed = wp_cache_get( 'last_changed', 'terms' );
    13151315    if ( ! $last_changed ) {
    1316         $last_changed = microtime();
     1316        $last_changed = microtime( true );
    13171317        wp_cache_set( 'last_changed', $last_changed, 'terms' );
    13181318    }
     
    28152815    }
    28162816
    2817     wp_cache_set( 'last_changed', microtime(), 'terms' );
     2817    wp_cache_set( 'last_changed', microtime( true ), 'terms' );
    28182818}
    28192819
Note: See TracChangeset for help on using the changeset viewer.