From 5060ec78aacd6d0a425bdd74189d1bb93c6cf8b4 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 8 Nov 2008 19:28:26 +0000 Subject: [PATCH] update method alters the reference it is sent. Fix this by using Clone, which is a grandfathered prerequisite --- lib/WebGUI/Asset.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 719ee9494..a3875b49f 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -16,6 +16,7 @@ package WebGUI::Asset; use Carp qw( croak confess ); use Scalar::Util qw( blessed ); +use Clone qw(clone); use WebGUI::AssetBranch; use WebGUI::AssetClipboard; @@ -2242,7 +2243,8 @@ to set the keywords for this asset. sub update { my $self = shift; - my $properties = shift; + my $requestedProperties = shift; + my $properties = clone($requestedProperties); $properties->{lastModified} = time(); # if keywords were specified, then let's set them the right way