diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b86ea4fb650..7d0a1266579 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -12,7 +12,7 @@ * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017-2019 Nicolas ZABOURI * Copyright (C) 2017 Rui Strecht - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2018 Josep Lluís Amador * Copyright (C) 2021 Gauthier VERDOL * @@ -869,23 +869,23 @@ abstract class CommonObject $outdone++; } } else { // Old code to remove - if ($this->skype) { + if (!empty($this->skype)) { $outsocialnetwork .= dol_print_socialnetworks($this->skype, $this->id, $object->id, 'skype'); } $outdone++; - if ($this->jabberid) { + if (!empty($this->jabberid)) { $outsocialnetwork .= dol_print_socialnetworks($this->jabberid, $this->id, $object->id, 'jabber'); } $outdone++; - if ($this->twitter) { + if (!empty($this->twitter)) { $outsocialnetwork .= dol_print_socialnetworks($this->twitter, $this->id, $object->id, 'twitter'); } $outdone++; - if ($this->facebook) { + if (!empty($this->facebook)) { $outsocialnetwork .= dol_print_socialnetworks($this->facebook, $this->id, $object->id, 'facebook'); } $outdone++; - if ($this->linkedin) { + if (!empty($this->linkedin)) { $outsocialnetwork .= dol_print_socialnetworks($this->linkedin, $this->id, $object->id, 'linkedin'); } $outdone++;