Changeset 56354
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-text-diff-renderer-table.php
r56178 r56354 512 512 * 513 513 * @since 4.0.0 514 * @since 6.4.0 Getting a dynamic property is deprecated. 514 515 * 515 516 * @param string $name Property to get. 516 * @return mixed Property.517 * @return mixed A declared property's value, else null. 517 518 */ 518 519 public function __get( $name ) { … … 520 521 return $this->$name; 521 522 } 523 524 trigger_error( 525 "The property `{$name}` is not declared. Getting a dynamic property is " . 526 'deprecated since version 6.4.0! Instead, declare the property on the class.', 527 E_USER_DEPRECATED 528 ); 529 return null; 522 530 } 523 531 … … 526 534 * 527 535 * @since 4.0.0 536 * @since 6.4.0 Setting a dynamic property is deprecated. 528 537 * 529 538 * @param string $name Property to check if set. 530 539 * @param mixed $value Property value. 531 * @return mixed Newly-set property.532 540 */ 533 541 public function __set( $name, $value ) { 534 542 if ( in_array( $name, $this->compat_fields, true ) ) { 535 return $this->$name = $value; 536 } 543 $this->$name = $value; 544 return; 545 } 546 547 trigger_error( 548 "The property `{$name}` is not declared. Setting a dynamic property is " . 549 'deprecated since version 6.4.0! Instead, declare the property on the class.', 550 E_USER_DEPRECATED 551 ); 537 552 } 538 553 … … 541 556 * 542 557 * @since 4.0.0 558 * @since 6.4.0 Checking a dynamic property is deprecated. 543 559 * 544 560 * @param string $name Property to check if set. … … 549 565 return isset( $this->$name ); 550 566 } 567 568 trigger_error( 569 "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " . 570 'is deprecated since version 6.4.0! Instead, declare the property on the class.', 571 E_USER_DEPRECATED 572 ); 573 return false; 551 574 } 552 575 … … 555 578 * 556 579 * @since 4.0.0 580 * @since 6.4.0 Unsetting a dynamic property is deprecated. 557 581 * 558 582 * @param string $name Property to unset. … … 561 585 if ( in_array( $name, $this->compat_fields, true ) ) { 562 586 unset( $this->$name ); 563 } 587 return; 588 } 589 590 trigger_error( 591 "A property `{$name}` is not declared. Unsetting a dynamic property is " . 592 'deprecated since version 6.4.0! Instead, declare the property on the class.', 593 E_USER_DEPRECATED 594 ); 564 595 } 565 596 }
Note: See TracChangeset
for help on using the changeset viewer.