Error: Can't call method "type" on an undefined value at /usr/lib/perl5/vendor_perl/5.8.6/Text/WikiFormat.pm

Hi RT Users,

today we played around with a lot of Scrips and we’re permanently stepping
into the following error:

error: Can’t call method “type” on an undefined value at
/usr/lib/perl5/vendor_perl/5.8.6/Text/WikiFormat.pm line 234.
context:

230:
231: my @open;
232: for my $block (@$blocks)
233: {
234: push @open, process_block( $block, $tags, $opts )
235: unless $block->type() eq ‘end’;
236: }
237:
238: return join(’’, @open);

code stack: /usr/lib/perl5/vendor_perl/5.8.6/Text/WikiFormat.pm:234
/usr/lib/perl5/vendor_perl/5.8.6/Text/WikiFormat.pm:136
/opt/rt3/share/html/Elements/ShowCustomFieldWikitext:49
/opt/rt3/local/html/Elements/ShowCustomFields:59
/opt/rt3/local/html/Ticket/Elements/ShowCustomFields:46
/opt/rt3/local/html/Ticket/Elements/ShowSummary:61
/opt/rt3/share/html/Widgets/TitleBox:49
/opt/rt3/local/html/Ticket/Elements/ShowSummary:62
/opt/rt3/local/html/Ticket/Display.html:56
/opt/rt3/share/html/Widgets/TitleBox:49
/opt/rt3/local/html/Ticket/Display.html:57
/opt/rt3/share/html/autohandler:247
raw error

The Scrip which triggers in front of this error will check for different CF
Values in a “Subticket” and give the Values Back to the “Masterticket”. If a
CF of type wiki text has no value, the error occurs, if the wiki text field
has a value, everything is fine.

Attached the scrip for this:

return(0) unless ($self->TicketObj->Type eq ‘ticket’);

my $note;
my $t = $self->TicketObj->Transactions;
$t->next;

while (my $o = $t->Next) {
$note .= $o->Content . “\n” if $o->ContentObj; }

foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => ‘ticket’ )) {
$obj->Comment(
Content => $self->loc( "Die GAI_ABF_SO Gruppe hat Ihre Arbeit
abgeschlossen. Bearbeiter: [_1].

Die Bearbeitung in anderen Gruppen kann noch laufen.", # loc
    $self->TransactionObj->CreatorObj->Name,
) . "\n" . 
	$self->loc( "Bearbeitungsnotiz: \n[_1]", # loc
    $note
),
);	

$obj->AddCustomFieldValue(Field => ‘ArtderAbfertigung’, Value =>
$self->TicketObj->FirstCustomFieldValue(‘ArtderAbfertigung’));
$obj->AddCustomFieldValue(Field => ‘AV-Schein|Warenbezeichnung’, Value =>
$self->TicketObj->FirstCustomFieldValue(‘AV-Schein|Warenbezeichnung’));

}

require RT::Action::Notify; bless($self, ‘RT::Action::Notify’);
$self->{Argument} = ‘Requestor’; $self->Prepare;

return 1;

We are running RT 3.5.6 on Redhat Fedora Core 4

Thanks for any hints and ideas…is there something wrong with my scrip?!?
Btw. the actual wiki pm is installed.

Torsten