Only add address if it exists.

This commit is contained in:
Bradley M. Kuhn 2015-12-30 04:32:34 -08:00
parent c6b52c42dd
commit 16101492c0

View file

@ -72,7 +72,7 @@ while (my $row = $sthOld->fetchrow_hashref) {
$sp->fulfillRequest($requestParamaters); $sp->fulfillRequest($requestParamaters);
} }
} }
$sp->addPostalAddress($donorId, $row->{formatted_address}, 'paypal'); $sp->addPostalAddress($donorId, $row->{formatted_address}, 'paypal') if defined $row->{formatted_address};
} }
$sthOld->finish(); $sthOld->finish();
foreach my $dbh ($dbhNew, $dbhOld) { foreach my $dbh ($dbhNew, $dbhOld) {