From 9c117ffa0546d6131310ae175e16e5ebf63992a1 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 26 Oct 2022 15:56:41 +0000 Subject: fix php warnings --- Zotlabs/Lib/Libzotdir.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib/Libzotdir.php') diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php index 3ee5c429a..fa691080f 100644 --- a/Zotlabs/Lib/Libzotdir.php +++ b/Zotlabs/Lib/Libzotdir.php @@ -457,12 +457,13 @@ class Libzotdir { $arr['xprof_hash'] = $hash; $arr['xprof_dob'] = '0000-00-00'; + if (isset($profile['birthday'])) { $arr['xprof_dob'] = (($profile['birthday'] === '0000-00-00') ? $profile['birthday'] : datetime_convert('', '', $profile['birthday'], 'Y-m-d')); // !!!! check this for 0000 year } - $arr['xprof_dob'] = ((isset($profile['birthday']) && $profile['birthday'] === '0000-00-00') ? $profile['birthday'] : datetime_convert('','',$profile['birthday'],'Y-m-d')); // !!!! check this for 0000 year + $arr['xprof_age'] = ((isset($profile['age']) && $profile['age']) ? intval($profile['age']) : 0); $arr['xprof_desc'] = ((isset($profile['description']) && $profile['description']) ? htmlspecialchars($profile['description'], ENT_COMPAT,'UTF-8',false) : ''); $arr['xprof_gender'] = ((isset($profile['gender']) && $profile['gender']) ? htmlspecialchars($profile['gender'], ENT_COMPAT,'UTF-8',false) : ''); -- cgit v1.2.3