From f7d43ce4fb7ecd14118baefb019096acca061b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 15 Mar 2021 20:55:59 +0100 Subject: [PATCH] fix php8 warnings --- htdocs/core/class/commonobject.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b86ea4fb650..022862e751b 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 * @@ -738,11 +738,11 @@ abstract class CommonObject } if ($this->element == 'contact') { $contactid = $this->id; - $thirdpartyid = $object->fk_soc; + $thirdpartyid = empty($object->fk_soc) ? 0 : $object->fk_soc; } if ($this->element == 'user') { $contactid = $this->contact_id; - $thirdpartyid = $object->fk_soc; + $thirdpartyid = empty($object->fk_soc) ? 0 : $object->fk_soc; } $out = '';