profile edit: empty dob is set to the date of the first profile save unless you clear it first

This commit is contained in:
zotlabs 2018-02-28 21:39:52 -08:00
parent 01015bc0d5
commit 6210b7727f

View File

@ -125,7 +125,7 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d
*/
function dob($dob) {
if ($dob === '0000-00-00')
if ($dob === '0000-00-00' || $dob === '')
$value = '';
else
$value = (($year) ? datetime_convert('UTC','UTC',$dob,'Y-m-d') : datetime_convert('UTC','UTC',$dob,'m-d'));