Changeset 56862 for branches/4.7/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:48:17 PM (2 years ago)
- File:
-
- 1 edited
-
branches/4.7/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7/src/wp-includes/class-wp-theme.php
r40326 r56862 532 532 533 533 /** 534 * Perform reinitialization tasks. 535 * 536 * Prevents a callback from being injected during unserialization of an object. 537 * 538 * @return void 539 */ 540 public function __wakeup() { 541 if ( $this->parent && ! $this->parent instanceof self ) { 542 throw new UnexpectedValueException(); 543 } 544 if ( $this->headers && ! is_array( $this->headers ) ) { 545 throw new UnexpectedValueException(); 546 } 547 foreach ( $this->headers as $value ) { 548 if ( ! is_string( $value ) ) { 549 throw new UnexpectedValueException(); 550 } 551 } 552 $this->headers_sanitized = array(); 553 } 554 555 /** 534 556 * Adds theme data to cache. 535 557 * … … 1497 1519 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1498 1520 } 1521 1522 private static function _check_headers_property_has_correct_type( $headers ) { 1523 if ( ! is_array( $headers ) ) { 1524 return false; 1525 } 1526 foreach ( $headers as $key => $value ) { 1527 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1528 return false; 1529 } 1530 } 1531 return true; 1532 } 1499 1533 }
Note: See TracChangeset
for help on using the changeset viewer.