Changeset 56878 for branches/5.4/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 03:06:49 PM (15 months ago)
- Location:
- branches/5.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.4/src/wp-includes/class-wp-theme.php
r47397 r56878 677 677 678 678 /** 679 * Perform reinitialization tasks. 680 * 681 * Prevents a callback from being injected during unserialization of an object. 682 * 683 * @return void 684 */ 685 public function __wakeup() { 686 if ( $this->parent && ! $this->parent instanceof self ) { 687 throw new UnexpectedValueException(); 688 } 689 if ( $this->headers && ! is_array( $this->headers ) ) { 690 throw new UnexpectedValueException(); 691 } 692 foreach ( $this->headers as $value ) { 693 if ( ! is_string( $value ) ) { 694 throw new UnexpectedValueException(); 695 } 696 } 697 $this->headers_sanitized = array(); 698 } 699 700 /** 679 701 * Adds theme data to cache. 680 702 * … … 1668 1690 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1669 1691 } 1692 1693 private static function _check_headers_property_has_correct_type( $headers ) { 1694 if ( ! is_array( $headers ) ) { 1695 return false; 1696 } 1697 foreach ( $headers as $key => $value ) { 1698 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1699 return false; 1700 } 1701 } 1702 return true; 1703 } 1670 1704 }
Note: See TracChangeset
for help on using the changeset viewer.