Changeset 56876 for branches/5.2/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 03:04:07 PM (3 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.2/src/wp-includes/class-wp-theme.php
r45080 r56876 632 632 633 633 /** 634 * Perform reinitialization tasks. 635 * 636 * Prevents a callback from being injected during unserialization of an object. 637 * 638 * @return void 639 */ 640 public function __wakeup() { 641 if ( $this->parent && ! $this->parent instanceof self ) { 642 throw new UnexpectedValueException(); 643 } 644 if ( $this->headers && ! is_array( $this->headers ) ) { 645 throw new UnexpectedValueException(); 646 } 647 foreach ( $this->headers as $value ) { 648 if ( ! is_string( $value ) ) { 649 throw new UnexpectedValueException(); 650 } 651 } 652 $this->headers_sanitized = array(); 653 } 654 655 /** 634 656 * Adds theme data to cache. 635 657 * … … 1609 1631 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1610 1632 } 1633 1634 private static function _check_headers_property_has_correct_type( $headers ) { 1635 if ( ! is_array( $headers ) ) { 1636 return false; 1637 } 1638 foreach ( $headers as $key => $value ) { 1639 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1640 return false; 1641 } 1642 } 1643 return true; 1644 } 1611 1645 }
Note: See TracChangeset
for help on using the changeset viewer.