You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this function, the parameter type also includes null. but it should not be null.
Could there be just no action if it is null?
/** * Sets metadata * * @param array<string,string>|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. * * @return self */publicfunctionsetMetadata($metadata)
{
if (is_null($metadata)) {
thrownew \InvalidArgumentException('non-nullable metadata cannot be null');
}
$this->container['metadata'] = $metadata;
return$this;
}
PS: it is in all setMetadata functions.
The text was updated successfully, but these errors were encountered:
GunniBusch
changed the title
Wrong parameter type in metadata function of Checkout
Wrong parameter type in metadata functions
Apr 30, 2024
We've just merged a fix that removes the null check. We realised that the serialiser will omit these during serialisation anyways so we simply use null values to remove fields on the setter. This means null is allowed as means to remove pre-filled fields. Hope that makes sense and answers your question.
In this function, the parameter type also includes null. but it should not be null.
Could there be just no action if it is null?
PS: it is in all
setMetadata
functions.The text was updated successfully, but these errors were encountered: