mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-26 08:14:26 +00:00
Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
git-svn-id: https://develop.svn.wordpress.org/trunk@17613 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -350,7 +350,7 @@ class WP_Object_Cache {
|
||||
if ( isset ($this->cache[$group][$id]) ) {
|
||||
$this->cache_hits += 1;
|
||||
if ( is_object($this->cache[$group][$id]) )
|
||||
return wp_clone($this->cache[$group][$id]);
|
||||
return clone $this->cache[$group][$id];
|
||||
else
|
||||
return $this->cache[$group][$id];
|
||||
}
|
||||
@@ -426,7 +426,7 @@ class WP_Object_Cache {
|
||||
$data = '';
|
||||
|
||||
if ( is_object($data) )
|
||||
$data = wp_clone($data);
|
||||
$data = clone $data;
|
||||
|
||||
$this->cache[$group][$id] = $data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user