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