Changeset 56353 for trunk/src/wp-includes/class-wp-user-query.php
- Timestamp:
- 08/03/2023 04:25:25 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-user-query.php
r56169 r56353 1110 1110 * 1111 1111 * @since 4.0.0 1112 * @since 6.4.0 Getting a dynamic property is deprecated. 1112 1113 * 1113 1114 * @param string $name Property to get. … … 1118 1119 return $this->$name; 1119 1120 } 1121 1122 trigger_error( 1123 "The property `{$name}` is not declared. Getting a dynamic property is " . 1124 'deprecated since version 6.4.0! Instead, declare the property on the class.', 1125 E_USER_DEPRECATED 1126 ); 1127 return null; 1120 1128 } 1121 1129 … … 1124 1132 * 1125 1133 * @since 4.0.0 1134 * @since 6.4.0 Setting a dynamic property is deprecated. 1126 1135 * 1127 1136 * @param string $name Property to check if set. 1128 1137 * @param mixed $value Property value. 1129 * @return mixed Newly-set property.1130 1138 */ 1131 1139 public function __set( $name, $value ) { 1132 1140 if ( in_array( $name, $this->compat_fields, true ) ) { 1133 return $this->$name = $value; 1134 } 1141 $this->$name = $value; 1142 return; 1143 } 1144 1145 trigger_error( 1146 "The property `{$name}` is not declared. Setting a dynamic property is " . 1147 'deprecated since version 6.4.0! Instead, declare the property on the class.', 1148 E_USER_DEPRECATED 1149 ); 1135 1150 } 1136 1151 … … 1139 1154 * 1140 1155 * @since 4.0.0 1156 * @since 6.4.0 Checking a dynamic property is deprecated. 1141 1157 * 1142 1158 * @param string $name Property to check if set. … … 1147 1163 return isset( $this->$name ); 1148 1164 } 1165 1166 trigger_error( 1167 "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " . 1168 'is deprecated since version 6.4.0! Instead, declare the property on the class.', 1169 E_USER_DEPRECATED 1170 ); 1171 return false; 1149 1172 } 1150 1173 … … 1153 1176 * 1154 1177 * @since 4.0.0 1178 * @since 6.4.0 Unsetting a dynamic property is deprecated. 1155 1179 * 1156 1180 * @param string $name Property to unset. … … 1159 1183 if ( in_array( $name, $this->compat_fields, true ) ) { 1160 1184 unset( $this->$name ); 1161 } 1185 return; 1186 } 1187 1188 trigger_error( 1189 "A property `{$name}` is not declared. Unsetting a dynamic property is " . 1190 'deprecated since version 6.4.0! Instead, declare the property on the class.', 1191 E_USER_DEPRECATED 1192 ); 1162 1193 } 1163 1194
Note: See TracChangeset
for help on using the changeset viewer.