WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:31:00 AM (8 years ago)
Author:
wonderboymusic
Message:

Some classes with __get() method also need __set().

See #27881, #22234.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-error.php

    r28511 r28521  
    7474    public function __get( $name ) {
    7575        return $this->$name;
     76    }
     77
     78    /**
     79     * Make private properties setable for backwards compatibility
     80     *
     81     * @since 4.0.0
     82     * @param string $name
     83     * @param string $value
     84     * @return mixed
     85     */
     86    public function __set( $name, $value ) {
     87        return $this->$name = $value;
    7688    }
    7789
Note: See TracChangeset for help on using the changeset viewer.