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:
Scott Taylor
2014-05-19 06:31:00 +00:00
parent e76545e011
commit 77c6420969
9 changed files with 110 additions and 1 deletions

View File

@@ -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.
*