Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions FirebaseABTesting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
- [fixed] Fix crash caused by empty experiment payload.

# 10.14.0
- [fixed] Fix crash caused by mutating array during iteration. (#11669)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ - (void)setExperimentWithOrigin:(NSString *)origin
return;
}

if (payload.experimentId == nil) {
// When doing experiment test on devices, the payload could be empty. Returning here to prevent
// app crash.
FIRLogInfo(kFIRLoggerABTesting, @"I-ABT000020", @"Experiment Id in payload is empty.");
return;
}

if (maxNumOfExperiments <= experiments.count) {
ABTExperimentPayloadExperimentOverflowPolicy overflowPolicy =
[self overflowPolicyWithPayload:payload originalPolicy:policy];
Expand Down