Changeset 56859 for branches/4.6/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:43:19 PM (3 years ago)
- File:
-
- 1 edited
-
branches/4.6/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6/src/wp-includes/class-wp-theme.php
r39810 r56859 531 531 532 532 /** 533 * Perform reinitialization tasks. 534 * 535 * Prevents a callback from being injected during unserialization of an object. 536 * 537 * @return void 538 */ 539 public function __wakeup() { 540 if ( $this->parent && ! $this->parent instanceof self ) { 541 throw new UnexpectedValueException(); 542 } 543 if ( $this->headers && ! is_array( $this->headers ) ) { 544 throw new UnexpectedValueException(); 545 } 546 foreach ( $this->headers as $value ) { 547 if ( ! is_string( $value ) ) { 548 throw new UnexpectedValueException(); 549 } 550 } 551 $this->headers_sanitized = array(); 552 } 553 554 /** 533 555 * Adds theme data to cache. 534 556 * … … 1441 1463 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1442 1464 } 1465 1466 private static function _check_headers_property_has_correct_type( $headers ) { 1467 if ( ! is_array( $headers ) ) { 1468 return false; 1469 } 1470 foreach ( $headers as $key => $value ) { 1471 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1472 return false; 1473 } 1474 } 1475 return true; 1476 } 1443 1477 }
Note: See TracChangeset
for help on using the changeset viewer.