X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=6a4596bf2427616f8030383a14f521d7062ae9d0;hb=e56e543a791289e27b5f0850a85f441773167447;hp=bd9762882ea96ea831e4ae4e4ce6756938a680b7;hpb=8b7cb5d9efeab580c2592e0fbe301f7142b73a3d;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index bd9762882e..6a4596bf24 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -65,7 +65,7 @@ function photos_init(App $a) { if (DI::args()->getArgc() > 1) { $owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]); - if (empty($owner) || $owner['account_removed']) { + if (!isset($owner['account_removed']) || $owner['account_removed']) { throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); } @@ -304,7 +304,7 @@ function photos_post(App $a) } if (!empty($_POST['rotate']) && (intval($_POST['rotate']) == 1 || intval($_POST['rotate']) == 2)) { - Logger::notice('rotate'); + Logger::debug('rotate'); $photo = Photo::getPhotoForUser($page_owner_uid, $resource_id); @@ -580,7 +580,7 @@ function photos_post(App $a) $album = trim($_REQUEST['album'] ?? ''); $newalbum = trim($_REQUEST['newalbum'] ?? ''); - Logger::info('album= ' . $album . ' newalbum= ' . $newalbum); + Logger::debug('album= ' . $album . ' newalbum= ' . $newalbum); if (!strlen($album)) { if (strlen($newalbum)) { @@ -678,14 +678,14 @@ function photos_post(App $a) return; } - Logger::info('loading the contents of ' . $src); + Logger::debug('loading contents', ['src' => $src]); $imagedata = @file_get_contents($src); $image = new Image($imagedata, $type); if (!$image->isValid()) { - Logger::info('unable to process image'); + Logger::notice('unable to process image'); notice(DI::l10n()->t('Unable to process image.')); @unlink($src); $foo = 0; @@ -711,7 +711,7 @@ function photos_post(App $a) $r = Photo::store($image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 0 , Photo::DEFAULT, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); if (!$r) { - Logger::info('image store failed'); + Logger::warning('image store failed'); notice(DI::l10n()->t('Image upload failed.')); return; }