diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:39:43 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:39:43 +0000 |
commit | 2e9f1bbdab7ee4cbf9fba8b5c99cb3e970f35f4b (patch) | |
tree | 192e2e752d21f4b27a0b0f702a7e295311ff8a4b /perl | |
parent | 2db38a1c391dbad2ea503d4894a837ba669968f7 (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.pm | 3 |
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; |