Skip to content

Commit 0aa29fd

Browse files
Cache API: Consistently pass the $expire value as an integer in cache functions.
Follow-up to [52700]. Props dilipbheda. Fixes #63364. git-svn-id: https://develop.svn.wordpress.org/trunk@60206 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 054c180 commit 0aa29fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
6262
function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
6363
global $wp_object_cache;
6464

65-
return $wp_object_cache->add_multiple( $data, $group, $expire );
65+
return $wp_object_cache->add_multiple( $data, $group, (int) $expire );
6666
}
6767

6868
/**
@@ -129,7 +129,7 @@ function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
129129
function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
130130
global $wp_object_cache;
131131

132-
return $wp_object_cache->set_multiple( $data, $group, $expire );
132+
return $wp_object_cache->set_multiple( $data, $group, (int) $expire );
133133
}
134134

135135
/**

0 commit comments

Comments
 (0)