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

@@ -75,6 +75,18 @@ class WP_Error {
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;
}
/**
* Retrieve all error codes.
*