]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Friendica/Photo/Create.php
Fix wrong default value in Module\Api\Friendica\Photo\Create::post
[friendica.git] / src / Module / Api / Friendica / Photo / Create.php
index c8ea2fbd78406e290fee2d8c5d862b4f06b84176..62889d328c9acbd3d504cd7099f1ebaa56b4668d 100644 (file)
@@ -54,8 +54,8 @@ class Create extends BaseApi
                $uid  = BaseApi::getCurrentUserID();
                $type = $this->getRequestValue($this->parameters, 'extension', 'json');
 
-               // input params 
-               $desc      = $this->getRequestValue($request, 'desc');
+               // input params
+               $desc      = $this->getRequestValue($request, 'desc') ?? '';
                $album     = $this->getRequestValue($request, 'album');
                $allow_cid = $this->getRequestValue($request, 'allow_cid');
                $deny_cid  = $this->getRequestValue($request, 'deny_cid');
@@ -90,7 +90,6 @@ class Create extends BaseApi
                if (!empty($photo)) {
                        $data = ['photo' => $this->friendicaPhoto->createFromId($photo['resource_id'], null, $uid, $type)];
                        $this->response->exit('photo_create', $data, $this->parameters['extension'] ?? null);
-                       return;
                } else {
                        throw new HTTPException\InternalServerErrorException('unknown error - uploading photo failed, see Friendica log for more information');
                }