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/post.php

    r27081 r27115  
    37503750    $last_changed = wp_cache_get( 'last_changed', 'posts' );
    37513751    if ( ! $last_changed ) {
    3752         $last_changed = microtime();
     3752        $last_changed = microtime( true );
    37533753        wp_cache_set( 'last_changed', $last_changed, 'posts' );
    37543754    }
     
    47644764    }
    47654765
    4766     wp_cache_set( 'last_changed', microtime(), 'posts' );
     4766    wp_cache_set( 'last_changed', microtime( true ), 'posts' );
    47674767}
    47684768
Note: See TracChangeset for help on using the changeset viewer.