I tried to add particular platform after adding a campaign using following code
$platform = new Platform();
$platform->id = 30001;
$operation = new CampaignCriterionOperation(new CampaignCriterion($campaign->id, $platform), 'ADD');
$campaignCriterionService = $user->GetService('CampaignCriterionService');
$result = $campaignCriterionService->mutate(array($operation));
but it gives following error
Unmarshalling Error: cvc-elt.4.3: Type 'ns1:Platform' is not validly derived from the type definition, 'boolean', of element 'ns1:isNegative'.
I don't know how to fix it as this was working a while ago
FYI, I am using sandbox mode
Please help, thanks in advance