aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-12-07 00:39:43 +0000
committerRuss Allbery <rra@stanford.edu>2007-12-07 00:39:43 +0000
commit2e9f1bbdab7ee4cbf9fba8b5c99cb3e970f35f4b (patch)
tree192e2e752d21f4b27a0b0f702a7e295311ff8a4b /perl
parent2db38a1c391dbad2ea503d4894a837ba669968f7 (diff)
Correctly implement the documented intention that setting an attribute
to the empty string clears the attribute values.
Diffstat (limited to 'perl')
-rw-r--r--perl/Wallet/Server.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl/Wallet/Server.pm b/perl/Wallet/Server.pm
index 5a7efb9..f04c139 100644
--- a/perl/Wallet/Server.pm
+++ b/perl/Wallet/Server.pm
@@ -373,6 +373,9 @@ sub attr {
my $host = $self->{host};
if (@values) {
return unless $self->acl_check ($object, 'setattr');
+ if (@values == 1 and $values[0] eq '') {
+ @values = ();
+ }
my $result = $object->attr ($attr, [ @values ], $user, $host);
$self->error ($object->error) unless $result;
return $result;