diff options
author | Mario <mario@mariovavti.com> | 2022-09-11 14:58:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-09-11 14:58:40 +0000 |
commit | 480862d7143f291658b48e785eda2e61a438a74b (patch) | |
tree | 29661e5f26e4ca5b1e9aff1e8875485157a057d3 /include/event.php | |
parent | 990a3af2a7349e07c10224cf2a023d179ecfd6ca (diff) | |
download | volse-hubzilla-480862d7143f291658b48e785eda2e61a438a74b.tar.gz volse-hubzilla-480862d7143f291658b48e785eda2e61a438a74b.tar.bz2 volse-hubzilla-480862d7143f291658b48e785eda2e61a438a74b.zip |
php8: fix more warnings
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/event.php b/include/event.php index f62c22792..0805bd2fe 100644 --- a/include/event.php +++ b/include/event.php @@ -28,7 +28,7 @@ function format_event_html($ev) { if(! ((is_array($ev)) && count($ev))) return ''; - $tz = (($ev['timezone']) ? $ev['timezone'] : 'UTC'); + $tz = $ev['timezone'] ?? 'UTC'; $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM @@ -39,9 +39,9 @@ function format_event_html($ev) { $o .= '<div class="event-title"><h3><i class="fa fa-calendar"></i> ' . zidify_links(smilies(bbcode($ev['summary']))) . '</h3></div>' . "\r\n"; $o .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span> <span class="dtstart" title="' - . datetime_convert('UTC', 'UTC', $ev['dtstart'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) + . datetime_convert('UTC', 'UTC', $ev['dtstart'], ((isset($ev['adjust']) && $ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) . '" >' - . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + . ((isset($ev['adjust']) && $ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $ev['dtstart'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $ev['dtstart'] , $bd_format))) @@ -49,9 +49,9 @@ function format_event_html($ev) { if(! $ev['nofinish']) $o .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span> <span class="dtend" title="' - . datetime_convert('UTC','UTC',$ev['dtend'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) + . datetime_convert('UTC','UTC',$ev['dtend'], ((isset($ev['adjust']) && $ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) . '" >' - . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + . ((isset($ev['adjust']) && $ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $ev['dtend'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $ev['dtend'] , $bd_format ))) @@ -59,7 +59,7 @@ function format_event_html($ev) { $o .= '<div class="event-description">' . zidify_links(smilies(bbcode($ev['description']))) . '</div>' . "\r\n"; - if(strlen($ev['location'])) + if(isset($ev['location']) && $ev['location']) $o .= '<div class="event-location"><span class="event-label"> ' . t('Location:') . '</span> <span class="location">' . zidify_links(smilies(bbcode($ev['location']))) . '</span></div>' . "\r\n"; |