// exception wanted!
throw $e;
} catch (\Exception $e) {
- $this->logger->warning('Unexpected error during authentication.', ['user' => $this->session->getLocalUserId(), 'exception' => $exception]);
+ $this->logger->warning('Unexpected error during authentication.', ['user' => $this->session->getLocalUserId(), 'exception' => $e]);
}
}
}
$base_image = Photo::selectFirst([], ['resource-id' => $resource_id, 'uid' => DI::userSession()->getLocalUserId(), 'scale' => $scale]);
if (DBA::isResult($base_image)) {
$Image = Photo::getImageForPhoto($base_image);
- if (empty($Image)) {
- throw new HTTPException\InternalServerErrorException();
- }
if ($Image->isValid()) {
// If setting for the default profile, unset the profile photo flag from any other photos I own
}
$Image = Photo::getImageForPhoto($photos[0]);
- if (empty($Image)) {
- throw new HTTPException\InternalServerErrorException();
- }
$imagecrop = [
'resource-id' => $resource_id,
header('Vary: Accept', false);
+ $alias = '';
+
if ($name == User::getActorName()) {
$owner = User::getSystemAccount();
if (empty($owner)) {
$parts[] = current(explode(';', $part));
}
- if (empty($parts)) {
+ if ($parts === []) {
return $default;
} elseif (in_array('application/jrd+json', $parts) && !in_array('application/xrd+xml', $parts)) {
return Response::TYPE_JSON;
public function __construct(string $label, string $link, string $image, string $url, string $text, string $when, string $ago, bool $seen)
{
- $this->label = $label ?? '';
- $this->link = $link ?? '';
- $this->image = $image ?? '';
- $this->url = $url ?? '';
- $this->text = $text ?? '';
- $this->when = $when ?? '';
- $this->ago = $ago ?? '';
- $this->seen = $seen ?? false;
+ $this->label = $label;
+ $this->link = $link;
+ $this->image = $image;
+ $this->url = $url;
+ $this->text = $text;
+ $this->when = $when;
+ $this->ago = $ago;
+ $this->seen = $seen;
}
}
}
}
-function theme_content(): string
+function theme_content(App $a): string
{
if (!DI::userSession()->getLocalUserId()) {
return '';