$photo = MPhoto::getPhoto($photoid, $scale, self::getCurrentUserID());
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));
}
}
$fetch = microtime(true) - $stamp;
if ($photo === false) {
+ $this->logger->notice('Photo was not loaded', ['parameters' => $this->parameters]);
throw new HTTPException\NotFoundException();
}
$mimetype = $photo['type'];
}
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();
}
$photo = MPhoto::selectFirst([], ['scale' => $scale, 'uid' => $contact['uid'], 'profile' => 1]);
if (!empty($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']]);
}
}
if (!empty($photo)) {
return $photo;
} else {
+ $this->logger->notice('Photo was not loaded', ['resource-id' => $resourceid]);
$url = $contact['avatar'];
}
} else {