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-list-table.php

    r28521 r28524  
    117117        public function __set( $name, $value ) {
    118118                return $this->$name = $value;
     119        }
     120
     121        /**
     122         * Make private properties checkable for backwards compatibility
     123         *
     124         * @since 4.0.0
     125         * @param string $name
     126         * @return mixed
     127         */
     128        public function __isset( $name ) {
     129                return isset( $this->$name );
     130        }
     131
     132        /**
     133         * Make private properties unsetable for backwards compatibility
     134         *
     135         * @since 4.0.0
     136         * @param string $name
     137         * @return mixed
     138         */
     139        public function __unset( $name ) {
     140                unset( $this->$name );
    119141        }
    120142
Note: See TracChangeset for help on using the changeset viewer.