I'm trying to set a field value via API using podio-php. If the field was already not empty, the following snippet made according to the manual works fine:
$item = PodioItem::get_basic( $item_id );
$field = $item->fields["field-name"];
$field->values = "2"; // let's say we have a number filed
$item->save(); // $field->save() also works
But if the field was empty, a warning Creating default object from empty value
occures on save. No errors, no changes in the item. This is true for different types of fields. I assume, a field-object should be created from scratch, but didn't managed to find an info on this for different field types.
So, please, how to correctly set a value with podio-php when the field is empty? Thanks.