Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid a PHP Notice: Undefined index: tix_attendee_id #1430

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function block_unauthenticated_actions() {
// Temporary: We don't want to block users from editing tickets unless they are unconfirmed.
// See: https://github.com/WordPress/wordcamp.org/issues/1393.
// See: https://github.com/WordPress/wordcamp.org/issues/1420.
if ( $this->user_is_editing_ticket() && ! $this->user_must_confirm_ticket( $_REQUEST['tix_attendee_id'] ) ) {
if ( $this->user_is_editing_ticket() && ! $this->user_must_confirm_ticket( $_REQUEST['tix_attendee_id'] ?? null ) ) {
return;
}

Expand Down Expand Up @@ -200,7 +200,7 @@ public function ticket_form_message() {
}

// Ask the attendee to confirm their registration
if ( $this->user_is_editing_ticket() && $this->user_must_confirm_ticket( $_REQUEST['tix_attendee_id'] ) ) {
if ( $this->user_is_editing_ticket() && $this->user_must_confirm_ticket( $_REQUEST['tix_attendee_id'] ?? null ) ) {
$tickets_selected = array( get_post_meta( $_REQUEST['tix_attendee_id'], 'tix_ticket_id', true ) => 1 ); // mimic $_REQUEST['tix_tickets_selected']

if ( $this->tickets_have_questions( $tickets_selected ) ) {
Expand Down
Loading