CloudKit-PHP icon indicating copy to clipboard operation
CloudKit-PHP copied to clipboard

Numeric values in fields

Open swiftjsoneditor opened this issue 8 years ago • 4 comments

Hello,

I am having issues with updating / creating integer values Int64

I am sending the field update as

$record->setField('isFirstTime', 1);

however the request fails with BadRequestException: Unexpected input

Any clue?

Thanks

swiftjsoneditor avatar Aug 06 '17 01:08 swiftjsoneditor

In Record.php line 139 you could try something else for the type. I think they might have changed it, I think they were mentioned here

malhal avatar Aug 06 '17 01:08 malhal

I figured it out, commenting line 151 in Record.php does the work as it looks like the type is no more needed.

swiftjsoneditor avatar Aug 07 '17 18:08 swiftjsoneditor

I think commenting line 151 keeps a number from being set! What should the actual fix for this issue be???

inPhilly avatar Sep 15 '17 00:09 inPhilly

erm...maybe he meant:

$fields[$key] = ['value' => $fv];

i.e. removing the type from the array

malhal avatar Sep 15 '17 00:09 malhal