Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:51:35 AM (13 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/includes/class-wp-filesystem-base.php

    r28521 r28524  
    6666        public function __set( $name, $value ) {
    6767                return $this->$name = $value;
     68        }
     69
     70        /**
     71         * Make private properties checkable for backwards compatibility
     72         *
     73         * @since 4.0.0
     74         * @param string $name
     75         * @return mixed
     76         */
     77        public function __isset( $name ) {
     78                return isset( $this->$name );
     79        }
     80
     81        /**
     82         * Make private properties unsetable for backwards compatibility
     83         *
     84         * @since 4.0.0
     85         * @param string $name
     86         * @return mixed
     87         */
     88        public function __unset( $name ) {
     89                unset( $this->$name );
    6890        }
    6991
Note: See TracChangeset for help on using the changeset viewer.