mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@27115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3749,7 +3749,7 @@ function get_pages( $args = array() ) {
|
||||
$key = md5( serialize( compact(array_keys($defaults)) ) );
|
||||
$last_changed = wp_cache_get( 'last_changed', 'posts' );
|
||||
if ( ! $last_changed ) {
|
||||
$last_changed = microtime();
|
||||
$last_changed = microtime( true );
|
||||
wp_cache_set( 'last_changed', $last_changed, 'posts' );
|
||||
}
|
||||
|
||||
@@ -4763,7 +4763,7 @@ function clean_post_cache( $post ) {
|
||||
do_action( 'clean_page_cache', $post->ID );
|
||||
}
|
||||
|
||||
wp_cache_set( 'last_changed', microtime(), 'posts' );
|
||||
wp_cache_set( 'last_changed', microtime( true ), 'posts' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user