From 3df15ba9a4a6f71cdd1737b16e546f4544620e4b Mon Sep 17 00:00:00 2001 From: Daniel Amitay Date: Thu, 10 Aug 2023 18:06:55 -0400 Subject: [PATCH] Fix mutating array during iteration crash (#11669) --- FirebaseABTesting/Sources/FIRExperimentController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FirebaseABTesting/Sources/FIRExperimentController.m b/FirebaseABTesting/Sources/FIRExperimentController.m index 21c64273a8e..e40989f3d2b 100644 --- a/FirebaseABTesting/Sources/FIRExperimentController.m +++ b/FirebaseABTesting/Sources/FIRExperimentController.m @@ -92,7 +92,7 @@ // Check if the experiment is in experiments but not payloads. for (id experiment in [experiments copy]) { BOOL doesExperimentNoLongerExist = YES; - for (NSData *payload in payloads) { + for (NSData *payload in [payloads copy]) { ABTExperimentPayload *experimentPayload = ABTDeserializeExperimentPayload(payload); if (!experimentPayload) { FIRLogInfo(kFIRLoggerABTesting, @"I-ABT000002",