mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
Some classes with __get() method also need __set().
See #27881, #22234. git-svn-id: https://develop.svn.wordpress.org/trunk@28521 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -268,7 +268,7 @@ class WP_Object_Cache {
|
||||
* @access private
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public $cache = array();
|
||||
private $cache = array();
|
||||
|
||||
/**
|
||||
* The amount of times the cache data was already stored in the cache.
|
||||
@@ -317,6 +317,18 @@ class WP_Object_Cache {
|
||||
return $this->$name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties setable for backwards compatibility
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @return mixed
|
||||
*/
|
||||
public function __set( $name, $value ) {
|
||||
return $this->$name = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds data to the cache if it doesn't already exist.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user