make sure nothing going into the object cache is being passed by reference. fixes #3726

git-svn-id: https://develop.svn.wordpress.org/trunk@4856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-02-01 09:16:15 +00:00
parent ea8fc7def2
commit 26f5beaa3d
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?php
function wp_cache_add($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->add($key, $data, $flag, $expire);
}
@ -37,12 +38,14 @@ function wp_cache_init() {
function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->replace($key, $data, $flag, $expire);
}
function wp_cache_set($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->set($key, $data, $flag, $expire);
}

View File

@ -3,6 +3,6 @@
// This holds the version number in a separate file so we can bump it without cluttering the SVN
$wp_version = '2.2-bleeding';
$wp_db_version = 4773;
$wp_db_version = 4774;
?>