RT 5.0.6 Use of uninitialized value

Hi all,
after upgrading from RT 5.0.5 to 5.0.6 I see a lot of this information in the syslog:

Use of uninitialized value $txn_type in pattern match (m//) at /opt/rt506/share/html/Elements/ShowTransaction line 217.
Use of uninitialized value $txn_type in string eq at /opt/rt506/share/html/Elements/ShowTransaction line 230.
Use of uninitialized value $txn_type in string eq at /opt/rt506/share/html/Elements/ShowTransaction line 252.
Use of uninitialized value $type in hash element at /opt/rt506/sbin/../lib/RT/Record.pm line 1801.
Use of uninitialized value in pattern match (m//) at /opt/rt506/share/html/Elements/ShowTransactionAttachments line 137.
Use of uninitialized value in pattern match (m//) at /usr/local/share/perl/5.32.1/HTML/Scrubber.pm line 223.
Use of uninitialized value in string eq at /opt/rt506/share/html/Elements/ShowHistoryPage line 69.
Use of uninitialized value in string eq at /opt/rt506/share/html/Elements/ShowTransaction line 86.

How can I start troubleshooting?
Thanks

The problem occurs when commenting (not replying) on a ticket.
RT wants to show the email sending operation even when you don’t have permission to see it.
if I give permission “ShowOutgoingEmail” the problem does not arise.
Without permission “ShowOutgoingEmail”:
immagine
With permission “ShowOutgoingEmail”:

Only on comment there is the problem, on Reply if i haven’t the permission i don’t show anything

same problem on RT 6.0.0:

syslog:Jun  9 18:24:57 rtdev RT: [646538] Use of uninitialized value $txn_type in pattern match (m//) at /opt/rt600/share/html/Elements/ShowTransaction line 230.
syslog:Jun  9 18:24:57 rtdev RT: [646538] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 242.
syslog:Jun  9 18:24:57 rtdev RT: [646538] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 264.
syslog:Jun  9 18:30:40 rtdev RT: [646538] Use of uninitialized value $txn_type in pattern match (m//) at /opt/rt600/share/html/Elements/ShowTransaction line 230.
syslog:Jun  9 18:30:40 rtdev RT: [646538] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 242.
syslog:Jun  9 18:30:40 rtdev RT: [646538] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 264.
syslog:Jun  9 18:31:07 rtdev RT: [646530] Use of uninitialized value $txn_type in pattern match (m//) at /opt/rt600/share/html/Elements/ShowTransaction line 230.
syslog:Jun  9 18:31:07 rtdev RT: [646530] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 242.
syslog:Jun  9 18:31:07 rtdev RT: [646530] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 264.
syslog:Jun  9 18:31:10 rtdev RT: [646538] Use of uninitialized value $txn_type in pattern match (m//) at /opt/rt600/share/html/Elements/ShowTransaction line 230.
syslog:Jun  9 18:31:10 rtdev RT: [646538] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 242.
syslog:Jun  9 18:31:10 rtdev RT: [646538] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 264.
syslog:Jun  9 18:34:33 rtdev RT: [646530] Use of uninitialized value $txn_type in pattern match (m//) at /opt/rt600/share/html/Elements/ShowTransaction line 230.
syslog:Jun  9 18:34:33 rtdev RT: [646530] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 242.
syslog:Jun  9 18:34:33 rtdev RT: [646530] Use of uninitialized value $txn_type in string eq at /opt/rt600/share/html/Elements/ShowTransaction line 264.

if i disable "View exact outgoing email messages and their recipients ":

if i enable ""View exact outgoing email messages and their recipients ":