[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] Changes to Address.pm



I added the following lines to Address.pm to get rid of some use of
uninitialized variable errors I was getting

Could they be added to the official copy?  All they do is set the variable
to a null value if they haven't been defined already.  The next sequence of
lines already in Address.pm return the values from the .pdb

I added them just before the "my $fieldMap;" line around line 600

        $record->{fields}{name} = "" if !defined($record->{fields}{name});
        $record->{fields}{firstName} = "" if
!defined($record->{fields}{firstName});
        $record->{fields}{company} = "" if
!defined($record->{fields}{company});
        $record->{fields}{phone1} = "" if
!defined($record->{fields}{phone1});
        $record->{fields}{phone2} = "" if
!defined($record->{fields}{phone2});
        $record->{fields}{phone3} = "" if
!defined($record->{fields}{phone3});
        $record->{fields}{phone4} = "" if
!defined($record->{fields}{phone4});
        $record->{fields}{phone5} = "" if
!defined($record->{fields}{phone5});
        $record->{fields}{address} = "" if
!defined($record->{fields}{address});
        $record->{fields}{city} = "" if !defined($record->{fields}{city});
        $record->{fields}{state} = "" if !defined($record->{fields}{state});
        $record->{fields}{zipCode} = "" if
!defined($record->{fields}{zipCode});
        $record->{fields}{country} = "" if
!defined($record->{fields}{country});
        $record->{fields}{title} = "" if !defined($record->{fields}{title});
        $record->{fields}{custom1} = "" if
!defined($record->{fields}{custom1});
        $record->{fields}{custom2} = "" if
!defined($record->{fields}{custom2});
        $record->{fields}{custom3} = "" if
!defined($record->{fields}{custom3});
        $record->{fields}{custom4} = "" if
!defined($record->{fields}{custom4});
        $record->{fields}{note} = "" if !defined($record->{fields}{note});



-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.