diff --git a/src/Module/Item/Display.php b/src/Module/Item/Display.php index 6a6d8dec52..615a8a6d47 100644 --- a/src/Module/Item/Display.php +++ b/src/Module/Item/Display.php @@ -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()); } diff --git a/src/Module/Magic.php b/src/Module/Magic.php index 891d702c03..c3b9a2b4db 100644 --- a/src/Module/Magic.php +++ b/src/Module/Magic.php @@ -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); } diff --git a/src/Module/Settings/Profile/Photo/Crop.php b/src/Module/Settings/Profile/Photo/Crop.php index d18b3e862d..53486fe001 100644 --- a/src/Module/Settings/Profile/Photo/Crop.php +++ b/src/Module/Settings/Profile/Photo/Crop.php @@ -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,