Changeset 56855 for branches/4.4/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:31:27 PM (2 years ago)
- File:
-
- 1 edited
-
branches/4.4/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4/src/wp-includes/class-wp-theme.php
r39812 r56855 520 520 521 521 /** 522 * Perform reinitialization tasks. 523 * 524 * Prevents a callback from being injected during unserialization of an object. 525 * 526 * @return void 527 */ 528 public function __wakeup() { 529 if ( $this->parent && ! $this->parent instanceof self ) { 530 throw new UnexpectedValueException(); 531 } 532 if ( $this->headers && ! is_array( $this->headers ) ) { 533 throw new UnexpectedValueException(); 534 } 535 foreach ( $this->headers as $value ) { 536 if ( ! is_string( $value ) ) { 537 throw new UnexpectedValueException(); 538 } 539 } 540 $this->headers_sanitized = array(); 541 } 542 543 /** 522 544 * Adds theme data to cache. 523 545 * … … 1330 1352 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1331 1353 } 1354 1355 private static function _check_headers_property_has_correct_type( $headers ) { 1356 if ( ! is_array( $headers ) ) { 1357 return false; 1358 } 1359 foreach ( $headers as $key => $value ) { 1360 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1361 return false; 1362 } 1363 } 1364 return true; 1365 } 1332 1366 }
Note: See TracChangeset
for help on using the changeset viewer.