Changeset 54321
- Timestamp:
- 09/27/2022 02:16:28 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r54320 r54321 1413 1413 'post_status' => 'draft', 1414 1414 'post_type' => 'post', 1415 'post_author' => null,1416 'post_password' => null,1417 'post_excerpt' => null,1418 'post_content' => null,1419 'post_title' => null,1420 'post_date' => null,1421 'post_date_gmt' => null,1415 'post_author' => 0, 1416 'post_password' => '', 1417 'post_excerpt' => '', 1418 'post_content' => '', 1419 'post_title' => '', 1420 'post_date' => '', 1421 'post_date_gmt' => '', 1422 1422 'post_format' => null, 1423 1423 'post_name' => null, 1424 1424 'post_thumbnail' => null, 1425 'post_parent' => null,1426 'ping_status' => null,1427 'comment_status' => null,1425 'post_parent' => 0, 1426 'ping_status' => '', 1427 'comment_status' => '', 1428 1428 'custom_fields' => null, 1429 1429 'terms_names' => null, … … 1500 1500 } 1501 1501 1502 if ( isset( $post_data['comment_status'] ) &&'open' !== $post_data['comment_status'] && 'closed' !== $post_data['comment_status'] ) {1502 if ( 'open' !== $post_data['comment_status'] && 'closed' !== $post_data['comment_status'] ) { 1503 1503 unset( $post_data['comment_status'] ); 1504 1504 } 1505 1505 1506 if ( isset( $post_data['ping_status'] ) &&'open' !== $post_data['ping_status'] && 'closed' !== $post_data['ping_status'] ) {1506 if ( 'open' !== $post_data['ping_status'] && 'closed' !== $post_data['ping_status'] ) { 1507 1507 unset( $post_data['ping_status'] ); 1508 1508 } … … 1681 1681 */ 1682 1682 $post_data = apply_filters( 'xmlrpc_wp_insert_post_data', $post_data, $content_struct ); 1683 1684 // Remove all null values to allow for using the insert/update post default values for those keys instead. 1685 $post_data = array_filter( 1686 $post_data, 1687 static function ( $value ) { 1688 return null !== $value; 1689 } 1690 ); 1683 1691 1684 1692 $post_ID = $update ? wp_update_post( $post_data, true ) : wp_insert_post( $post_data, true ); -
trunk/tests/phpunit/tests/date/xmlrpc.php
r54217 r54321 25 25 */ 26 26 public function test_date_new_post() { 27 if ( PHP_VERSION_ID >= 80100 ) {28 /*29 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in30 * via hooked in filter functions until a more structural solution to the31 * "missing input validation" conundrum has been architected and implemented.32 */33 $this->expectDeprecation();34 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );35 }36 37 27 $timezone = 'Europe/Helsinki'; 38 28 update_option( 'timezone_string', $timezone );
Note: See TracChangeset
for help on using the changeset viewer.