]> git.mxchange.org Git - friendica.git/commitdiff
Fix annotation from review
authorArt4 <art4@wlabs.de>
Mon, 18 Nov 2024 14:20:57 +0000 (14:20 +0000)
committerArt4 <art4@wlabs.de>
Mon, 18 Nov 2024 14:20:57 +0000 (14:20 +0000)
src/Module/Item/Display.php
src/Module/Magic.php
src/Module/Settings/Profile/Photo/Crop.php

index 6a6d8dec527270ae83d96b1b19e59ea7fbb0d9e3..615a8a6d47583d718c1f84272fd9aecde94a4b59 100644 (file)
@@ -167,7 +167,7 @@ class Display extends BaseModule
        {
                $author = [];
                $shared = $this->contentItem->getSharedPost($item, ['author-link']);
-               if (array_key_exists('comment', $shared) && !$shared['comment']) {
+               if (array_key_exists('comment', $shared) && strval($shared['comment']) !== '') {
                        $author = Contact::getByURLForUser($shared['post']['author-link'], $this->session->getLocalUserId());
                }
 
index 891d702c03b28acf9c091087185a98c235d0547a..c3b9a2b4db152b6bb4a6549f5b81150e36ca22d8 100644 (file)
@@ -78,7 +78,6 @@ class Magic extends BaseModule
 
                $contact = Contact::getByURL($addr ?: $dest);
                if ($contact === [] && $owa === 0) {
-                       # code...
                        $this->logger->info('No contact record found, no oWA, redirecting to destination.', ['request' => $request, 'server' => $_SERVER, 'dest' => $dest]);
                        $this->app->redirect($dest);
                }
index d18b3e862d6e220653b63e78253f9cc64948aff1..53486fe001918d7215b5398c40587a1e94021076 100644 (file)
@@ -182,6 +182,9 @@ class Crop extends BaseSettings
                }
 
                $Image = Photo::getImageForPhoto($photos[0]);
+               if (!$Image->isValid()) {
+                       throw new HTTPException\InternalServerErrorException();
+               }
 
                $imagecrop = [
                        'resource-id' => $resource_id,