[Rt-commit] rt branch, 4.0/attribute-deletesubvalue, created. rt-4.0.20-40-gab2df94
Alex Vandiver
alexmv at bestpractical.com
Mon Jun 30 18:31:06 EDT 2014
The branch, 4.0/attribute-deletesubvalue has been created
at ab2df9495b12530246f16bb38519e0f863318532 (commit)
- Log -----------------------------------------------------------------
commit ab2df9495b12530246f16bb38519e0f863318532
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Jun 20 19:06:54 2014 -0400
Fix RT::Attribute::DeleteSubValue to work
Since its introduction in 0ca3e1fd, it has assumed ->Content returned a
hash, not a hashref, and has passed a hash, not a hashref, to
->SetContent. Fix both of these, making it mirror the working
->SubValue method.
diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index 316acbf..745f95f 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -312,12 +312,9 @@ Deletes the subvalue with the key NAME
sub DeleteSubValue {
my $self = shift;
my $key = shift;
- my %values = $self->Content();
- delete $values{$key};
- $self->SetContent(%values);
-
-
-
+ my $values = $self->Content();
+ delete $values->{$key};
+ $self->SetContent($values);
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list