mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 20:04:32 +02:00
Merge pull request #14870 from annando/issue-14800
Added more logging to track down issue 14800
This commit is contained in:
commit
43f67dd2a2
1 changed files with 8 additions and 0 deletions
|
@ -130,6 +130,7 @@ class Photo extends BaseApi
|
||||||
|
|
||||||
$photo = MPhoto::getPhoto($photoid, $scale, self::getCurrentUserID());
|
$photo = MPhoto::getPhoto($photoid, $scale, self::getCurrentUserID());
|
||||||
if ($photo === false) {
|
if ($photo === false) {
|
||||||
|
$this->logger->notice('Photo was not loaded', ['parameters' => $this->parameters, 'id' => $photoid]);
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo with id %s is not available.', $photoid));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo with id %s is not available.', $photoid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,6 +138,7 @@ class Photo extends BaseApi
|
||||||
$fetch = microtime(true) - $stamp;
|
$fetch = microtime(true) - $stamp;
|
||||||
|
|
||||||
if ($photo === false) {
|
if ($photo === false) {
|
||||||
|
$this->logger->notice('Photo was not loaded', ['parameters' => $this->parameters]);
|
||||||
throw new HTTPException\NotFoundException();
|
throw new HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +153,7 @@ class Photo extends BaseApi
|
||||||
$mimetype = $photo['type'];
|
$mimetype = $photo['type'];
|
||||||
}
|
}
|
||||||
if (empty($imgdata) && empty($photo['blurhash'])) {
|
if (empty($imgdata) && empty($photo['blurhash'])) {
|
||||||
|
$this->logger->notice('Image data was not loaded', ['parameters' => $this->parameters, 'class' => $photo['backend-class'], 'ref' => $photo['backend-ref']]);
|
||||||
throw new HTTPException\NotFoundException();
|
throw new HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +320,11 @@ class Photo extends BaseApi
|
||||||
$photo = MPhoto::selectFirst([], ['scale' => $scale, 'uid' => $contact['uid'], 'profile' => 1]);
|
$photo = MPhoto::selectFirst([], ['scale' => $scale, 'uid' => $contact['uid'], 'profile' => 1]);
|
||||||
if (!empty($photo)) {
|
if (!empty($photo)) {
|
||||||
return $photo;
|
return $photo;
|
||||||
|
} else {
|
||||||
|
$this->logger->notice('Profile photo was not loaded', ['scale' => $scale, 'uid' => $contact['uid']]);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->logger->notice('Local Contact was not found', ['url' => $contact['nurl']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,6 +340,7 @@ class Photo extends BaseApi
|
||||||
if (!empty($photo)) {
|
if (!empty($photo)) {
|
||||||
return $photo;
|
return $photo;
|
||||||
} else {
|
} else {
|
||||||
|
$this->logger->notice('Photo was not loaded', ['resource-id' => $resourceid]);
|
||||||
$url = $contact['avatar'];
|
$url = $contact['avatar'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue