[rt-users] Use of uninitialized value in pattern match (m//) [yet again]

Vlad marchenko at gmail.com
Fri Jul 13 13:40:57 EDT 2007


Hi,

running RT 3.6.4 and my messages log is filled with

Jul 13 17:30:56 dc7 RT: Use of uninitialized value in pattern match
(m//) at rt/lib/RT/Transaction_Overlay.pm line 1079.

since it looks like it's unlikely to be fixed any time soon (I've seen
posts about that from 2006), could someone just confirm that it's safe
to modify that line like that to get rid of these annoying messages:

@@ -1076,7 +1076,7 @@

     if ( UNIVERSAL::can( $self->Object, 'QueueObj' ) ) {

-        unless ( $field =~ /^\d+$/o ) {
+        unless ( defined $field && $field =~ /^\d+$/o ) {
             my $CFs = RT::CustomFields->new( $self->CurrentUser );
              $CFs->Limit( FIELD => 'Name', VALUE => $field);
             $CFs->LimitToLookupType($self->CustomFieldLookupType);


-- 
Vlad



More information about the rt-users mailing list