Changeset 56880 for branches/5.5/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 03:09:08 PM (19 months ago)
- Location:
- branches/5.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.5/src/wp-includes/class-wp-theme.php
r48590 r56880 676 676 677 677 /** 678 * Perform reinitialization tasks. 679 * 680 * Prevents a callback from being injected during unserialization of an object. 681 * 682 * @return void 683 */ 684 public function __wakeup() { 685 if ( $this->parent && ! $this->parent instanceof self ) { 686 throw new UnexpectedValueException(); 687 } 688 if ( $this->headers && ! is_array( $this->headers ) ) { 689 throw new UnexpectedValueException(); 690 } 691 foreach ( $this->headers as $value ) { 692 if ( ! is_string( $value ) ) { 693 throw new UnexpectedValueException(); 694 } 695 } 696 $this->headers_sanitized = array(); 697 } 698 699 /** 678 700 * Adds theme data to cache. 679 701 * … … 1659 1681 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1660 1682 } 1683 1684 private static function _check_headers_property_has_correct_type( $headers ) { 1685 if ( ! is_array( $headers ) ) { 1686 return false; 1687 } 1688 foreach ( $headers as $key => $value ) { 1689 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1690 return false; 1691 } 1692 } 1693 return true; 1694 } 1661 1695 }
Note: See TracChangeset
for help on using the changeset viewer.