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/cache.php

    r28520 r28521  
    269269     * @since 2.0.0
    270270     */
    271     public $cache = array();
     271    private $cache = array();
    272272
    273273    /**
     
    316316    public function __get( $name ) {
    317317        return $this->$name;
     318    }
     319
     320    /**
     321     * Make private properties setable for backwards compatibility
     322     *
     323     * @since 4.0.0
     324     * @param string $name
     325     * @param string $value
     326     * @return mixed
     327     */
     328    public function __set( $name, $value ) {
     329        return $this->$name = $value;
    318330    }
    319331
Note: See TracChangeset for help on using the changeset viewer.