Changeset 56864 for branches/4.8/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:50:31 PM (3 years ago)
- File:
-
- 1 edited
-
branches/4.8/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8/src/wp-includes/class-wp-theme.php
r40301 r56864 548 548 549 549 /** 550 * Perform reinitialization tasks. 551 * 552 * Prevents a callback from being injected during unserialization of an object. 553 * 554 * @return void 555 */ 556 public function __wakeup() { 557 if ( $this->parent && ! $this->parent instanceof self ) { 558 throw new UnexpectedValueException(); 559 } 560 if ( $this->headers && ! is_array( $this->headers ) ) { 561 throw new UnexpectedValueException(); 562 } 563 foreach ( $this->headers as $value ) { 564 if ( ! is_string( $value ) ) { 565 throw new UnexpectedValueException(); 566 } 567 } 568 $this->headers_sanitized = array(); 569 } 570 571 /** 550 572 * Adds theme data to cache. 551 573 * … … 1515 1537 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1516 1538 } 1539 1540 private static function _check_headers_property_has_correct_type( $headers ) { 1541 if ( ! is_array( $headers ) ) { 1542 return false; 1543 } 1544 foreach ( $headers as $key => $value ) { 1545 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1546 return false; 1547 } 1548 } 1549 return true; 1550 } 1517 1551 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)