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-admin/custom-header.php

    r28521 r28524  
    102102    public function __set( $name, $value ) {
    103103        return $this->$name = $value;
     104    }
     105
     106    /**
     107     * Make private properties checkable for backwards compatibility
     108     *
     109     * @since 4.0.0
     110     * @param string $name
     111     * @return mixed
     112     */
     113    public function __isset( $name ) {
     114        return isset( $this->$name );
     115    }
     116
     117    /**
     118     * Make private properties unsetable for backwards compatibility
     119     *
     120     * @since 4.0.0
     121     * @param string $name
     122     * @return mixed
     123     */
     124    public function __unset( $name ) {
     125        unset( $this->$name );
    104126    }
    105127
Note: See TracChangeset for help on using the changeset viewer.