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-ajax-response.php

    r28508 r28521  
    3939    public function __get( $name ) {
    4040        return $this->$name;
     41    }
     42
     43    /**
     44     * Make private properties setable for backwards compatibility
     45     *
     46     * @since 4.0.0
     47     * @param string $name
     48     * @param string $value
     49     * @return mixed
     50     */
     51    public function __set( $name, $value ) {
     52        return $this->$name = $value;
    4153    }
    4254
Note: See TracChangeset for help on using the changeset viewer.