Indicate if there's no existing preferred email address
Show "(none)" when there's no existing preferred email address instead of an unitialized variable warning.
This commit is contained in:
parent
fd6b55e7be
commit
c94f0001b9
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ my $sp = new Supporters($dbh, [ "none" ]);
|
|||
|
||||
$sp->addEmailAddress($supporterId, $email, $emailType);
|
||||
|
||||
print "Preferred email address was: ", $sp->getPreferredEmailAddress($supporterId), "\n";
|
||||
print "Preferred email address was: ", $sp->getPreferredEmailAddress($supporterId) || "(none)", "\n";
|
||||
if ($preferred) {
|
||||
$sp->setPreferredEmailAddress($supporterId, $email);
|
||||
print "Preferred email address is now: ", $sp->getPreferredEmailAddress($supporterId), "\n";
|
||||
|
|
Loading…
Reference in a new issue