Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:51:35 AM (11 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.php

    r28521 r28524  
    687687
    688688    /**
     689     * Make private properties checkable for backwards compatibility
     690     *
     691     * @since 4.0.0
     692     * @param string $name
     693     * @return mixed
     694     */
     695    public function __isset( $name ) {
     696        return isset( $this->$name );
     697    }
     698
     699    /**
     700     * Make private properties unsetable for backwards compatibility
     701     *
     702     * @since 4.0.0
     703     * @param string $name
     704     * @return mixed
     705     */
     706    public function __unset( $name ) {
     707        unset( $this->$name );
     708    }
     709
     710    /**
    689711     * Make private/protected methods readable for backwards compatibility
    690712     *
Note: See TracChangeset for help on using the changeset viewer.