From 903d9d52de2fb458b3a732782ab4dff96ac2db9b Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 20 Mar 2024 04:26:16 +0100 Subject: [PATCH] Fix Expected an object instance & duplicate assignment # Fix Expected an object instance & duplicate assignment Fix: ticket.class.php: PhanTypeExpectedObjectOrClassName: Expected an object instance or the name of a class but saw expression $classname with type ''|string Fix: ticket.class.php: PhanPluginRedundantAssignment: Assigning '' to variable $sendtocc which already has that value --- htdocs/ticket/class/ticket.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 8f40a7c02ac..f1bf6a7ce19 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2430,7 +2430,7 @@ class Ticket extends CommonObject } } - if ($filefound) { + if ($classname !== '') { $result = dol_include_once($reldir."core/modules/ticket/".$modele.'.php'); $modTicket = new $classname(); @@ -2992,7 +2992,6 @@ class Ticket extends CommonObject $array_receiver = array_merge($array_receiver, $this->getInfosTicketExternalContact(1)); } - $sendtocc = ""; if ($send_internal_cc) { $sendtocc = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM'); } else {