Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:51:35 AM (9 years ago)
Author:
wonderboymusic
Message:

Classes that have __set() also need __isset() and __unset().

See #27881, #22234.

File:
1 edited

Legend:

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

    r28521 r28524  
    6161    public function __set( $name, $value ) {
    6262        return $this->$name = $value;
     63    }
     64
     65    /**
     66     * Make private properties checkable for backwards compatibility
     67     *
     68     * @since 4.0.0
     69     * @param string $name
     70     * @return mixed
     71     */
     72    public function __isset( $name ) {
     73        return isset( $this->$name );
     74    }
     75
     76    /**
     77     * Make private properties unsetable for backwards compatibility
     78     *
     79     * @since 4.0.0
     80     * @param string $name
     81     * @return mixed
     82     */
     83    public function __unset( $name ) {
     84        unset( $this->$name );
    6385    }
    6486
Note: See TracChangeset for help on using the changeset viewer.