Changeset 56857 for branches/4.5/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:34:12 PM (2 years ago)
- File:
-
- 1 edited
-
branches/4.5/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.5/src/wp-includes/class-wp-theme.php
r39811 r56857 529 529 530 530 /** 531 * Perform reinitialization tasks. 532 * 533 * Prevents a callback from being injected during unserialization of an object. 534 * 535 * @return void 536 */ 537 public function __wakeup() { 538 if ( $this->parent && ! $this->parent instanceof self ) { 539 throw new UnexpectedValueException(); 540 } 541 if ( $this->headers && ! is_array( $this->headers ) ) { 542 throw new UnexpectedValueException(); 543 } 544 foreach ( $this->headers as $value ) { 545 if ( ! is_string( $value ) ) { 546 throw new UnexpectedValueException(); 547 } 548 } 549 $this->headers_sanitized = array(); 550 } 551 552 /** 531 553 * Adds theme data to cache. 532 554 * … … 1372 1394 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1373 1395 } 1396 1397 private static function _check_headers_property_has_correct_type( $headers ) { 1398 if ( ! is_array( $headers ) ) { 1399 return false; 1400 } 1401 foreach ( $headers as $key => $value ) { 1402 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1403 return false; 1404 } 1405 } 1406 return true; 1407 } 1374 1408 }
Note: See TracChangeset
for help on using the changeset viewer.