We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f0dbcb commit c683d83Copy full SHA for c683d83
lib/OpenCloud/ObjectStore/CDNService.php
@@ -54,18 +54,19 @@ public function cdnContainer($data)
54
{
55
$container = new CDNContainer($this, $data);
56
57
- $metadata = new ContainerMetadata();
58
- $metadata->setArray(array(
59
- 'Streaming-Uri' => $data->cdn_streaming_uri,
60
- 'Ios-Uri' => $data->cdn_ios_uri,
61
- 'Ssl-Uri' => $data->cdn_ssl_uri,
62
- 'Enabled' => $data->cdn_enabled,
63
- 'Ttl' => $data->ttl,
64
- 'Log-Retention' => $data->log_retention,
65
- 'Uri' => $data->cdn_uri,
66
- ));
67
-
68
- $container->setMetadata($metadata);
+ if (is_object($data)) {
+ $metadata = new ContainerMetadata();
+ $metadata->setArray(array(
+ 'Streaming-Uri' => $data->cdn_streaming_uri,
+ 'Ios-Uri' => $data->cdn_ios_uri,
+ 'Ssl-Uri' => $data->cdn_ssl_uri,
+ 'Enabled' => $data->cdn_enabled,
+ 'Ttl' => $data->ttl,
+ 'Log-Retention' => $data->log_retention,
+ 'Uri' => $data->cdn_uri,
+ ));
+ $container->setMetadata($metadata);
69
+ }
70
71
return $container;
72
}
0 commit comments