Add default values for inserts
This commit is contained in:
parent
2b433e0ea6
commit
91707a530c
1 changed files with 11 additions and 11 deletions
|
@ -483,17 +483,17 @@ function notification($params)
|
||||||
|
|
||||||
if ($show_in_notification_page) {
|
if ($show_in_notification_page) {
|
||||||
$notification = DI::notify()->insert([
|
$notification = DI::notify()->insert([
|
||||||
'name' => $params['source_name'],
|
'name' => $params['source_name'] ?? '',
|
||||||
'name_cache' => strip_tags(BBCode::convert($params['source_name'])),
|
'name_cache' => strip_tags(BBCode::convert($params['source_name'] ?? '')),
|
||||||
'url' => $params['source_link'],
|
'url' => $params['source_link'] ?? '',
|
||||||
'photo' => $params['source_photo'],
|
'photo' => $params['source_photo'] ?? '',
|
||||||
'link' => $itemlink,
|
'link' => $itemlink ?? '',
|
||||||
'uid' => $params['uid'],
|
'uid' => $params['uid'] ?? 0,
|
||||||
'iid' => $item_id,
|
'iid' => $item_id ?? 0,
|
||||||
'parent' => $parent_id,
|
'parent' => $parent_id ?? 0,
|
||||||
'type' => $params['type'],
|
'type' => $params['type'] ?? '',
|
||||||
'verb' => $params['verb'],
|
'verb' => $params['verb'] ?? '',
|
||||||
'otype' => $params['otype'],
|
'otype' => $params['otype'] ?? '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
|
$notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
|
||||||
|
|
Loading…
Reference in a new issue