aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzotdir.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-10-25 19:06:17 +0200
committerMario Vavti <mario@mariovavti.com>2022-10-25 19:06:17 +0200
commit221b31bcc6f16510c0f242e96ac696b2dd0eca58 (patch)
tree98b52d9fd582a715128665ffb2b7262f3e212289 /Zotlabs/Lib/Libzotdir.php
parent8879776d6436ed5257648a1873ddaa9486b25070 (diff)
downloadvolse-hubzilla-221b31bcc6f16510c0f242e96ac696b2dd0eca58.tar.gz
volse-hubzilla-221b31bcc6f16510c0f242e96ac696b2dd0eca58.tar.bz2
volse-hubzilla-221b31bcc6f16510c0f242e96ac696b2dd0eca58.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Lib/Libzotdir.php')
-rw-r--r--Zotlabs/Lib/Libzotdir.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php
index 77429c45b..3ee5c429a 100644
--- a/Zotlabs/Lib/Libzotdir.php
+++ b/Zotlabs/Lib/Libzotdir.php
@@ -453,9 +453,15 @@ class Libzotdir {
if (! $hash)
return false;
- $arr = array();
-
- $arr['xprof_hash'] = $hash;
+ $arr = [];
+
+ $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) : '');