Derp, forgot I was actually giving the post[file] to OuroborosPost, making assert fail for null

This commit is contained in:
Diftraku 2013-12-03 05:51:55 +02:00
parent 095f743d57
commit 1a25014564

View File

@ -11,6 +11,7 @@
* <ul> * <ul>
* <li>Index/List</li> * <li>Index/List</li>
* <li>Show</li> * <li>Show</li>
* <li>Create</li>
* </ul> * </ul>
* </li> * </li>
* <li>Tag: * <li>Tag:
@ -269,10 +270,12 @@ class OuroborosPost extends _SafeOuroborosImage {
$this->tags = $post['tags']; $this->tags = $post['tags'];
} }
if (array_key_exists('file', $post)) { if (array_key_exists('file', $post)) {
assert(is_array($post['file'])); if (!is_null($post['file'])) {
assert(array_key_exists('tmp_name', $post['file'])); assert(is_array($post['file']));
assert(array_key_exists('name', $post['file'])); assert(array_key_exists('tmp_name', $post['file']));
$this->file = $post['file']; assert(array_key_exists('name', $post['file']));
$this->file = $post['file'];
}
} }
if (array_key_exists('rating', $post)) { if (array_key_exists('rating', $post)) {
assert( assert(