Changeset 56870 for branches/6.0/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:59:09 PM (14 months ago)
- Location:
- branches/6.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/6.0/src/wp-includes/class-wp-theme.php
r53417 r56870 715 715 716 716 /** 717 * Perform reinitialization tasks. 718 * 719 * Prevents a callback from being injected during unserialization of an object. 720 * 721 * @return void 722 */ 723 public function __wakeup() { 724 if ( $this->parent && ! $this->parent instanceof self ) { 725 throw new UnexpectedValueException(); 726 } 727 if ( $this->headers && ! is_array( $this->headers ) ) { 728 throw new UnexpectedValueException(); 729 } 730 foreach ( $this->headers as $value ) { 731 if ( ! is_string( $value ) ) { 732 throw new UnexpectedValueException(); 733 } 734 } 735 $this->headers_sanitized = array(); 736 } 737 738 /** 717 739 * Adds theme data to cache. 718 740 * … … 1772 1794 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1773 1795 } 1796 1797 private static function _check_headers_property_has_correct_type( $headers ) { 1798 if ( ! is_array( $headers ) ) { 1799 return false; 1800 } 1801 foreach ( $headers as $key => $value ) { 1802 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1803 return false; 1804 } 1805 } 1806 return true; 1807 } 1774 1808 }
Note: See TracChangeset
for help on using the changeset viewer.