From 107cc6f297b8af88b2fd3d4b382e6cc80edfec69 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Nov 2021 06:05:37 +0000 Subject: [PATCH] Possibly Avoid database error when storing photo item --- include/api.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/api.php b/include/api.php index cacb83ca9c..a982d4c7bc 100644 --- a/include/api.php +++ b/include/api.php @@ -411,9 +411,9 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f $arr = []; $arr['guid'] = System::createUUID(); - $arr['uid'] = intval($uid); + $arr['uid'] = $uid; $arr['uri'] = $uri; - $arr['type'] = 'photo'; + $arr['post-type'] = Item::PT_IMAGE; $arr['wall'] = 1; $arr['resource-id'] = $hash; $arr['contact-id'] = $owner_record['id']; @@ -423,7 +423,7 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f $arr['author-name'] = $owner_record['name']; $arr['author-link'] = $owner_record['url']; $arr['author-avatar'] = $owner_record['thumb']; - $arr['title'] = ""; + $arr['title'] = ''; $arr['allow_cid'] = $allow_cid; $arr['allow_gid'] = $allow_gid; $arr['deny_cid'] = $deny_cid;