Unable to set the checkbox value

Unable to set the checkbox value

Hi,

By using php sdk, I was trying to set the CRM checkbox value like:
  1. $record1->addKeyValue('Demo', true);
but the error I got was something like: Type error, expected type is array, given type was boolean. So I changed it to 
  1. $record1->addKeyValue('Demo', [true]);
but the error this time was 
  1. Warning: get_class() expects parameter 1 to be object, bool given
The line where it throws an exception is 
  1. $requestObject = $convertInstance->formRequest($this->request, get_class($this->request), null, null)
When I debug it, getClass has the value "com\zoho\crm\api\record\BodyWrapper" but the whole line fails.

Can you please help me out?