Changeset 31144 for trunk/src/wp-includes/user.php
- Timestamp:
- 01/11/2015 09:59:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r31126 r31144 473 473 */ 474 474 private $total_users = 0; 475 476 private $compat_fields = array( 'results', 'total_users' ); 475 477 476 478 // SQL clauses … … 929 931 */ 930 932 public function __get( $name ) { 931 return $this->$name; 933 if ( in_array( $name, $this->compat_fields ) ) { 934 return $this->$name; 935 } 932 936 } 933 937 … … 938 942 * @access public 939 943 * 940 * @param string $name Property to set.944 * @param string $name Property to check if set. 941 945 * @param mixed $value Property value. 942 946 * @return mixed Newly-set property. 943 947 */ 944 948 public function __set( $name, $value ) { 945 return $this->$name = $value; 949 if ( in_array( $name, $this->compat_fields ) ) { 950 return $this->$name = $value; 951 } 946 952 } 947 953 … … 956 962 */ 957 963 public function __isset( $name ) { 958 return isset( $this->$name ); 964 if ( in_array( $name, $this->compat_fields ) ) { 965 return isset( $this->$name ); 966 } 959 967 } 960 968 … … 968 976 */ 969 977 public function __unset( $name ) { 970 unset( $this->$name ); 978 if ( in_array( $name, $this->compat_fields ) ) { 979 unset( $this->$name ); 980 } 971 981 } 972 982 … … 982 992 */ 983 993 public function __call( $name, $arguments ) { 984 return call_user_func_array( array( $this, $name ), $arguments ); 994 if ( 'get_search_sql' === $name ) { 995 return call_user_func_array( array( $this, $name ), $arguments ); 996 } 997 return false; 985 998 } 986 999 }
Note: See TracChangeset
for help on using the changeset viewer.