diff --git a/ext/ouroboros_api/main.php b/ext/ouroboros_api/main.php
index 1304b9a7..b16abbc7 100644
--- a/ext/ouroboros_api/main.php
+++ b/ext/ouroboros_api/main.php
@@ -11,6 +11,7 @@
*
* - Index/List
* - Show
+ * - Create
*
*
* Tag:
@@ -269,10 +270,12 @@ class OuroborosPost extends _SafeOuroborosImage {
$this->tags = $post['tags'];
}
if (array_key_exists('file', $post)) {
- assert(is_array($post['file']));
- assert(array_key_exists('tmp_name', $post['file']));
- assert(array_key_exists('name', $post['file']));
- $this->file = $post['file'];
+ if (!is_null($post['file'])) {
+ assert(is_array($post['file']));
+ assert(array_key_exists('tmp_name', $post['file']));
+ assert(array_key_exists('name', $post['file']));
+ $this->file = $post['file'];
+ }
}
if (array_key_exists('rating', $post)) {
assert(