Changeset 56349 for trunk/src/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 08/02/2023 06:35:24 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r56261 r56349 177 177 * 178 178 * @since 4.0.0 179 * @since 6.4.0 Getting a dynamic property is deprecated. 179 180 * 180 181 * @param string $name Property to get. … … 185 186 return $this->$name; 186 187 } 188 189 trigger_error( 190 "The property `{$name}` is not defined. Getting a dynamic (undefined) property is " . 191 'deprecated since version 6.4.0! Instead, define the property on the class.', 192 E_USER_DEPRECATED 193 ); 194 return null; 187 195 } 188 196 … … 191 199 * 192 200 * @since 4.0.0 201 * @since 6.4.0 Setting a dynamic property is deprecated. 193 202 * 194 203 * @param string $name Property to check if set. 195 204 * @param mixed $value Property value. 196 * @return mixed Newly-set property.197 205 */ 198 206 public function __set( $name, $value ) { 199 207 if ( in_array( $name, $this->compat_fields, true ) ) { 200 return $this->$name = $value; 201 } 208 $this->$name = $value; 209 return; 210 } 211 212 trigger_error( 213 "The property `{$name}` is not defined. Setting a dynamic (undefined) property is " . 214 'deprecated since version 6.4.0! Instead, define the property on the class.', 215 E_USER_DEPRECATED 216 ); 202 217 } 203 218 … … 206 221 * 207 222 * @since 4.0.0 223 * @since 6.4.0 Checking a dynamic property is deprecated. 208 224 * 209 225 * @param string $name Property to check if set. … … 215 231 } 216 232 233 trigger_error( 234 "The property `{$name}` is not defined. Checking `isset()` on a dynamic (undefined) property " . 235 'is deprecated since version 6.4.0! Instead, define the property on the class.', 236 E_USER_DEPRECATED 237 ); 217 238 return false; 218 239 } … … 222 243 * 223 244 * @since 4.0.0 245 * @since 6.4.0 Unsetting a dynamic property is deprecated. 224 246 * 225 247 * @param string $name Property to unset. … … 228 250 if ( in_array( $name, $this->compat_fields, true ) ) { 229 251 unset( $this->$name ); 230 } 252 return; 253 } 254 255 trigger_error( 256 "A property `{$name}` is not defined. Unsetting a dynamic (undefined) property is " . 257 'deprecated since version 6.4.0! Instead, define the property on the class.', 258 E_USER_DEPRECATED 259 ); 231 260 } 232 261
Note: See TracChangeset
for help on using the changeset viewer.