Remove hyphens when 'tel' extra var is empty

cf. https://xetown.com/topics/1356877
This commit is contained in:
Kijin Sung 2020-03-08 18:00:01 +09:00
parent 21bcd888c9
commit 08d1ab98d0

View file

@ -322,7 +322,7 @@ class ExtraItem
return ($value) ? sprintf('<a href="mailto:%s">%s</a>', $value, $value) : "";
case 'tel' :
return sprintf('%s-%s-%s', $value[0], $value[1], $value[2]);
return $value ? implode('-', $value) : '';
case 'textarea' :
return nl2br($value);