Merge pull request #9730 from atm-ph/fix_7.0_extrafield_date_not_show

Fix extrafield contact typed as date isn't show in the list from 'con…
This commit is contained in:
Laurent Destailleur 2018-10-13 12:03:07 +02:00 committed by GitHub
commit 76e6968a21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ if (! empty($extrafieldsobjectkey)) // New method: $extrafieldsobject can be 'so
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')))
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey))
{
$value = $db->jdate($obj->$tmpkey);
}