Browse files

Return empty string for missing account status variables instead of u…

…ndef.
  • Loading branch information...
1 parent 787ef1a commit 0d377590c674b20eafe46ae46a7db296f73a8e73 @racke racke committed Sep 21, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Nitesi/Account/Manager.pm
View
7 lib/Nitesi/Account/Manager.pm
@@ -339,7 +339,12 @@ sub status {
$self->{account} = $self->{session_sub}->('update', {@args});
}
elsif (@args == 1) {
- return $self->{account}->{$args[0]};
+ if (exists $self->{account}->{$args[0]}) {
+ return $self->{account}->{$args[0]};
+ }
+ else {
+ return '';
+ }
}
}

0 comments on commit 0d37759

Please sign in to comment.