Changeset 56842 for branches/6.3/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 01:20:35 PM (2 years ago)
- Location:
- branches/6.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
-
branches/6.3/src/wp-includes/class-wp-theme.php
r56180 r56842 743 743 744 744 /** 745 * Perform reinitialization tasks. 746 * 747 * Prevents a callback from being injected during unserialization of an object. 748 * 749 * @return void 750 */ 751 public function __wakeup() { 752 if ( $this->parent && ! $this->parent instanceof self ) { 753 throw new UnexpectedValueException(); 754 } 755 if ( $this->headers && ! is_array( $this->headers ) ) { 756 throw new UnexpectedValueException(); 757 } 758 foreach ( $this->headers as $value ) { 759 if ( ! is_string( $value ) ) { 760 throw new UnexpectedValueException(); 761 } 762 } 763 $this->headers_sanitized = array(); 764 } 765 766 /** 745 767 * Adds theme data to cache. 746 768 * … … 1813 1835 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1814 1836 } 1837 1838 private static function _check_headers_property_has_correct_type( $headers ) { 1839 if ( ! is_array( $headers ) ) { 1840 return false; 1841 } 1842 foreach ( $headers as $key => $value ) { 1843 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1844 return false; 1845 } 1846 } 1847 return true; 1848 } 1815 1849 }
Note: See TracChangeset
for help on using the changeset viewer.