Changeset 56850 for branches/4.1/src/wp-includes/class-wp-theme.php
- Timestamp:
- 10/12/2023 02:21:47 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-includes/class-wp-theme.php
r39815 r56850 478 478 479 479 /** 480 * Perform reinitialization tasks. 481 * 482 * Prevents a callback from being injected during unserialization of an object. 483 * 484 * @return void 485 */ 486 public function __wakeup() { 487 if ( $this->parent && ! $this->parent instanceof self ) { 488 throw new UnexpectedValueException(); 489 } 490 if ( $this->headers && ! is_array( $this->headers ) ) { 491 throw new UnexpectedValueException(); 492 } 493 foreach ( $this->headers as $value ) { 494 if ( ! is_string( $value ) ) { 495 throw new UnexpectedValueException(); 496 } 497 } 498 $this->headers_sanitized = array(); 499 } 500 501 /** 480 502 * Adds theme data to cache. 481 503 * … … 1233 1255 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1234 1256 } 1257 1258 private static function _check_headers_property_has_correct_type( $headers ) { 1259 if ( ! is_array( $headers ) ) { 1260 return false; 1261 } 1262 foreach ( $headers as $key => $value ) { 1263 if ( ! is_string( $key ) || ! is_string( $value ) ) { 1264 return false; 1265 } 1266 } 1267 return true; 1268 } 1235 1269 }
Note: See TracChangeset
for help on using the changeset viewer.