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

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/ line 234.

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

code stack: /usr/lib/perl5/vendor_perl/5.8.6/Text/
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;

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

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

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

$obj->AddCustomFieldValue(Field => ‘ArtderAbfertigung’, Value =>
$obj->AddCustomFieldValue(Field => ‘AV-Schein|Warenbezeichnung’, Value =>


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.