Ticket #39732: 39732.12.diff
File 39732.12.diff, 905 bytes (added by , 3 years ago) |
---|
-
src/wp-includes/comment.php
2422 2422 * @since 2.0.0 2423 2423 * @since 4.9.0 Add updating comment meta during comment update. 2424 2424 * @since 5.5.0 The `$wp_error` parameter was added. 2425 * @since 5.5.0 The return values for an invalid comment or post ID 2426 * were changed to false instead of 0. 2425 2427 * 2426 2428 * @global wpdb $wpdb WordPress database abstraction object. 2427 2429 * … … 2439 2441 if ( $wp_error ) { 2440 2442 return new WP_Error( 'invalid_comment_id', __( 'Invalid comment ID.' ) ); 2441 2443 } else { 2442 return 0;2444 return false; 2443 2445 } 2444 2446 } 2445 2447 … … 2448 2450 if ( $wp_error ) { 2449 2451 return new WP_Error( 'invalid_post_id', __( 'Invalid post ID.' ) ); 2450 2452 } else { 2451 return 0;2453 return false; 2452 2454 } 2453 2455 } 2454 2456