Skip to content

Commit

Permalink
fix: prevent PHP warning when previewing prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Feb 16, 2023
1 parent 6fde157 commit 5a85939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/campaigns/class-maybe-show-campaign.php
Original file line number Diff line number Diff line change
@@ -272,7 +272,7 @@ public function should_popup_be_shown( $client_id, $popup, $settings, $referer_u
$should_display = true;
}
}
} elseif ( $should_display && ! empty( $popup_segment_ids ) ) {
} elseif ( $should_display && ! empty( $popup_segment_ids ) && ! empty( $settings ) ) {
// $settings->best_priority_segment_id should always be present, but in case it's not (e.g. in a unit test), we can fetch it here.
$best_priority_segment_id = isset( $settings->best_priority_segment_id ) ?
$settings->best_priority_segment_id :

0 comments on commit 5a85939

Please sign in to comment.