Skip to content

Commit 2dbd38f

Browse files
committedFeb 4, 2012
Make a safe copy of the config file before modifying it. Fixes bug #12322.

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎docs/changelog/7.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
7.10.25
22
- fixed #12321: Error while deleting a group.
3+
- fixed #12322: Cache/CHI stomps on the config file
34

45
7.10.24
56
- fixed #12318: asset error causes asset manager to fail

‎lib/WebGUI/Cache/CHI.pm

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package WebGUI::Cache::CHI;
33
use strict;
44
use base 'WebGUI::Cache';
55
use File::Temp qw/tempdir/;
6+
use clone qw/clone/;
67
use CHI;
78

89
=head1 NAME
@@ -92,7 +93,7 @@ sub new {
9293
# Create CHI object from config
9394
my $chi;
9495
unless ( $chi = $session->stow->get( "CHI" ) ) {
95-
my $cacheConf = $session->config->get('cache');
96+
my $cacheConf = clone $session->config->get('cache');
9697
$cacheConf->{namespace} = $namespace;
9798
$cacheConf->{is_size_aware} = 1;
9899

0 commit comments

Comments
 (0)
Please sign in to comment.