aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/event.php2
-rw-r--r--include/text.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php
index 6273279c2..894a1e4f7 100644
--- a/include/event.php
+++ b/include/event.php
@@ -713,7 +713,7 @@ function event_addtocal($item_id, $uid) {
intval($channel['channel_id'])
);
- if((! $r) || ($r[0]['obj_type'] !== ACTIVITY_OBJ_EVENT))
+ if(!$r || !in_array($r[0]['obj_type'], ['Event', ACTIVITY_OBJ_EVENT]))
return false;
$item = $r[0];
diff --git a/include/text.php b/include/text.php
index 13b385e98..d84b36378 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1794,7 +1794,8 @@ function prepare_body(&$item,$attach = false,$opts = false) {
$s = $poll;
}
- $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event_obj($item['obj']) : []);
+ $event = (in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT]) ? format_event_obj($item['obj']) : []);
+
$prep_arr = [
'item' => $item,
'html' => $event ? $event['content'] : $s,