Changeset 56871 for branches/5.0/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:59:28 PM (3 years ago)
- File:
-
- 1 edited
-
branches/5.0/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/class-wp-theme.php
r43809 r56871 537 537 538 538 /** 539 * Perform reinitialization tasks. 540 * 541 * Prevents a callback from being injected during unserialization of an object. 542 * 543 * @return void 544 */ 545 public function __wakeup() { 546 if ( $this->parent && ! $this->parent instanceof self ) { 547 throw new UnexpectedValueException(); 548 } 549 if ( $this->headers && ! is_array( $this->headers ) ) { 550 throw new UnexpectedValueException(); 551 } 552 foreach ( $this->headers as $value ) { 553 if ( ! is_string( $value ) ) { 554 throw new UnexpectedValueException(); 555 } 556 } 557 $this->headers_sanitized = array(); 558 } 559 560 /** 539 561 * Adds theme data to cache. 540 562 * … … 1488 1510 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1489 1511 } 1512 1513 private static function _check_headers_property_has_correct_type( $headers ) { 1514 if ( ! is_array( $headers ) ) { 1515 return false; 1516 } 1517 foreach ( $headers as $key => $value ) { 1518 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1519 return false; 1520 } 1521 } 1522 return true; 1523 } 1490 1524 }
Note: See TracChangeset
for help on using the changeset viewer.