[Rt-devel] Uninitialized value in mattern match in Transaction_Overlay.pm:1068

Petter Reinholdtsen pere at hungry.com
Wed Aug 9 10:56:31 EDT 2006


In one of my RT instances, the rt log fills up with messages like
this:

  [Wed Aug 9 14:38:21 2006] [warning]: Use of uninitialized value in
    pattern match (m//) at /usr/local/rt3/lib/RT/Transaction_Overlay.pm
    line 1068. (/usr/local/rt3/lib/RT/Transaction_Overlay.pm:1068)

The problem is in this code, where $field seem to be undef:

sub CustomFieldValues {
    my $self  = shift;
    my $field = shift;

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

        unless ( $field =~ /^\d+$/o ) {
            my $CFs = RT::CustomFields->new( $self->CurrentUser );
             $CFs->Limit( FIELD => 'Name', VALUE => $field);
            $CFs->LimitToLookupType($self->CustomFieldLookupType);
            $CFs->LimitToGlobalOrObjectId($self->Object->QueueObj->id);
            $field = $CFs->First->id if $CFs->First;
        }
    }
    return $self->SUPER::CustomFieldValues($field);
}

Will this be fixed in v3.6.1?

Friendly,
-- 
Petter Reinholdtsen


More information about the Rt-devel mailing list