We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 172c68b commit 214d504Copy full SHA for 214d504
includes/core/classes/class-event-rest-api.php
@@ -507,8 +507,8 @@ public function update_rsvp( WP_REST_Request $request ): WP_REST_Response {
507
$user_id = isset( $params['user_id'] ) ? intval( $params['user_id'] ) : $current_user_id;
508
$post_id = intval( $params['post_id'] );
509
$status = sanitize_key( $params['status'] );
510
- $guests = intval( $params['guests'] );
511
- $anonymous = intval( $params['anonymous'] );
+ $guests = intval( $params['guests'] ?? 0 );
+ $anonymous = intval( $params['anonymous'] ?? 0 );
512
$event = new Event( $post_id );
513
514
// If managing user is adding someone to an event.
0 commit comments