Changeset 9740
- Timestamp:
- 11/17/2008 09:01:12 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cache.php
r8742 r9740 314 314 if (isset ($this->cache[$group][$id])) { 315 315 $this->cache_hits += 1; 316 return $this->cache[$group][$id]; 316 if ( is_object($this->cache[$group][$id]) ) 317 return wp_clone($this->cache[$group][$id]); 318 else 319 return $this->cache[$group][$id]; 317 320 } 318 321 … … 373 376 if (NULL === $data) 374 377 $data = ''; 378 379 if ( is_object($data) ) 380 $data = wp_clone($data); 375 381 376 382 $this->cache[$group][$id] = $data; -
trunk/wp-includes/functions.php
r9662 r9740 2873 2873 } 2874 2874 2875 function wp_clone($object) { 2876 return version_compare(phpversion(), '5.0') < 0 ? $object : clone($object); 2877 } 2878 2879 2875 2880 ?>
Note: See TracChangeset
for help on using the changeset viewer.