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

git-svn-id: http://svn.automattic.com/wordpress/trunk@4856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-02-01 09:16:15 +00:00
parent 12e9cabfb7
commit 36491e0980
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;
?>