mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
Fix fatal error in notifications
This commit is contained in:
parent
d63edf5dfa
commit
f9a3b67318
1 changed files with 3 additions and 3 deletions
|
@ -77,7 +77,7 @@ class Notify extends BaseEntity
|
||||||
protected $verb;
|
protected $verb;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $otype;
|
protected $otype;
|
||||||
/** @var string */
|
/** @var string|null */
|
||||||
protected $name_cache;
|
protected $name_cache;
|
||||||
/** @var string|null */
|
/** @var string|null */
|
||||||
protected $msg_cache;
|
protected $msg_cache;
|
||||||
|
@ -88,7 +88,7 @@ class Notify extends BaseEntity
|
||||||
/** @var int|null */
|
/** @var int|null */
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
public function __construct(int $type, string $name, UriInterface $url, UriInterface $photo, DateTime $date, int $uid, UriInterface $link, bool $seen, string $verb, string $otype, string $name_cache, string $msg = null, string $msg_cache = null, int $itemId = null, int $uriId = null, int $parent = null, ?int $parentUriId = null, ?int $id = null)
|
public function __construct(int $type, string $name, UriInterface $url, UriInterface $photo, DateTime $date, int $uid, UriInterface $link, bool $seen, string $verb, string $otype, string $name_cache = null, string $msg = null, string $msg_cache = null, int $itemId = null, int $uriId = null, int $parent = null, ?int $parentUriId = null, ?int $id = null)
|
||||||
{
|
{
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
|
@ -118,7 +118,7 @@ class Notify extends BaseEntity
|
||||||
public function updateMsgFromPreamble($epreamble)
|
public function updateMsgFromPreamble($epreamble)
|
||||||
{
|
{
|
||||||
$this->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $this->link->__toString()]);
|
$this->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $this->link->__toString()]);
|
||||||
$this->msg_cache = self::formatMessage($this->name_cache, BBCode::toPlaintext($this->msg, false));
|
$this->msg_cache = self::formatMessage($this->name_cache ?? $this->name, BBCode::toPlaintext($this->msg, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue