WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/01/2007 09:16:15 AM (11 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cache.php

    r4855 r4856  
    22function wp_cache_add($key, $data, $flag = '', $expire = 0) {
    33    global $wp_object_cache;
     4    $data = unserialize(serialize($data));
    45
    56    return $wp_object_cache->add($key, $data, $flag, $expire);
     
    3839function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
    3940    global $wp_object_cache;
     41    $data = unserialize(serialize($data));
    4042
    4143    return $wp_object_cache->replace($key, $data, $flag, $expire);
     
    4446function wp_cache_set($key, $data, $flag = '', $expire = 0) {
    4547    global $wp_object_cache;
     48    $data = unserialize(serialize($data));
    4649
    4750    return $wp_object_cache->set($key, $data, $flag, $expire);
Note: See TracChangeset for help on using the changeset viewer.