Changeset 56852 for branches/4.3/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:28:05 PM (3 years ago)
- File:
-
- 1 edited
-
branches/4.3/src/wp-includes/class-wp-theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3/src/wp-includes/class-wp-theme.php
r39813 r56852 508 508 509 509 /** 510 * Perform reinitialization tasks. 511 * 512 * Prevents a callback from being injected during unserialization of an object. 513 * 514 * @return void 515 */ 516 public function __wakeup() { 517 if ( $this->parent && ! $this->parent instanceof self ) { 518 throw new UnexpectedValueException(); 519 } 520 if ( $this->headers && ! is_array( $this->headers ) ) { 521 throw new UnexpectedValueException(); 522 } 523 foreach ( $this->headers as $value ) { 524 if ( ! is_string( $value ) ) { 525 throw new UnexpectedValueException(); 526 } 527 } 528 $this->headers_sanitized = array(); 529 } 530 531 /** 510 532 * Adds theme data to cache. 511 533 * … … 1304 1326 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1305 1327 } 1328 1329 private static function _check_headers_property_has_correct_type( $headers ) { 1330 if ( ! is_array( $headers ) ) { 1331 return false; 1332 } 1333 foreach ( $headers as $key => $value ) { 1334 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1335 return false; 1336 } 1337 } 1338 return true; 1339 } 1306 1340 }
Note: See TracChangeset
for help on using the changeset viewer.