From 8879776d6436ed5257648a1873ddaa9486b25070 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 23 Oct 2022 14:02:19 +0200 Subject: fix php warnings --- include/channel.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index a42315ed6..296615524 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1581,6 +1581,8 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $details = $location = false; $pdesc = true; $reddress = true; + $connect_url = ''; + $connect = ''; if(! perm_is_allowed($profile['uid'], $observer_hash, 'view_profile')) { $block = true; @@ -1792,7 +1794,7 @@ function advanced_profile() { $profile['birthday'] = array( t('Birthday:'), $val); } - if($age = age(App::$profile['dob'],App::$profile['timezone'],'')) + if($age = age(App::$profile['dob'], App::$profile['timezone'] ?? '','')) $profile['age'] = array( t('Age:'), $age ); if(App::$profile['marital']) @@ -1874,7 +1876,7 @@ function advanced_profile() { return replace_macros($tpl, array( '$title' => t('Profile'), - '$canlike' => (($profile['canlike'])? true : false), + '$canlike' => ((isset($profile['canlike']) && $profile['canlike'])? true : false), '$likethis' => t('Like this thing'), '$export' => t('Export'), '$exportlink' => $exportlink, -- cgit v1.2.3