-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The asset background property is configured as a string, but deserialize receive stdClass object instead.
Dump
$data : {#1642 ▼
+"padding": 0
+"color": "#FFFFFF"
+"opacity": 1
+"borderRadius": 0
}
$class : "string"
Log
Object of class stdClass could not be converted to string
at vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:498
at settype(object(stdClass), 'string')
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:498)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), 'string', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\Asset', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\Clip', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:420)
at Shotstack\Client\ObjectSerializer::deserialize(array(object(stdClass)), '\\Shotstack\\Client\\Model\\Clip[]', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\Track', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:420)
at Shotstack\Client\ObjectSerializer::deserialize(array(object(stdClass), object(stdClass), object(stdClass), object(stdClass), object(stdClass), object(stdClass), object(stdClass), object(stdClass)), '\\Shotstack\\Client\\Model\\Track[]', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\Timeline', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\Edit', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\RenderResponseData', null)
(vendor/shotstack/shotstack-sdk-php/src/ObjectSerializer.php:544)
at Shotstack\Client\ObjectSerializer::deserialize(object(stdClass), '\\Shotstack\\Client\\Model\\RenderResponse', array())
(vendor/shotstack/shotstack-sdk-php/src/Api/EditApi.php:483)
at Shotstack\Client\Api\EditApi->getRenderWithHttpInfo('xxx', null, null, 'application/json')
(vendor/shotstack/shotstack-sdk-php/src/Api/EditApi.php:402)
at Shotstack\Client\Api\EditApi->getRender('xxx')
Temp fix
I created a temporary function to bypass the deserializer.
public function getRenderRaw(string $id): array
{
$request = $this->editApi->getRenderRequest($id);
$result = (new Client())->send($request);
$result = json_decode($result->getBody()->getContents(), true);
return $result['response'];
}Metadata
Metadata
Assignees
Labels
No labels