Changeset 56895 for branches/6.2/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 04:07:43 PM (16 months ago)
- Location:
- branches/6.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.2
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/6.2/src/wp-includes/class-wp-theme.php
r55426 r56895 741 741 742 742 /** 743 * Perform reinitialization tasks. 744 * 745 * Prevents a callback from being injected during unserialization of an object. 746 * 747 * @return void 748 */ 749 public function __wakeup() { 750 if ( $this->parent && ! $this->parent instanceof self ) { 751 throw new UnexpectedValueException(); 752 } 753 if ( $this->headers && ! is_array( $this->headers ) ) { 754 throw new UnexpectedValueException(); 755 } 756 foreach ( $this->headers as $value ) { 757 if ( ! is_string( $value ) ) { 758 throw new UnexpectedValueException(); 759 } 760 } 761 $this->headers_sanitized = array(); 762 } 763 764 /** 743 765 * Adds theme data to cache. 744 766 * … … 1809 1831 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1810 1832 } 1833 1834 private static function _check_headers_property_has_correct_type( $headers ) { 1835 if ( ! is_array( $headers ) ) { 1836 return false; 1837 } 1838 foreach ( $headers as $key => $value ) { 1839 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1840 return false; 1841 } 1842 } 1843 return true; 1844 } 1811 1845 }
Note: See TracChangeset
for help on using the changeset viewer.