Skip to content

Commit

Permalink
Item9232: got untangling a bit of code slightly wrong; I added an agg…
Browse files Browse the repository at this point in the history
…ressive error check for an error that was previously blithely ignored.

git-svn-id: http://svn.foswiki.org/trunk@8029 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Jul 5, 2010
1 parent fe55ec9 commit 56d7276
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/lib/Foswiki/Configure/Load.pm
Expand Up @@ -156,10 +156,12 @@ hash reference or a scalar value. The replacement is done in-place.
=cut

sub expandValue {
if (ref($_[0])) {
Carp::confess 'Can\'t handle a '.ref($_[0])
unless ref($_[0]) eq 'HASH';
if (ref($_[0]) eq 'HASH') {
map { expandValue($_) } values %{$_[0]};
} elsif (ref($_[0]) eq 'ARRAY') {
map { expandValue($_) } @{$_[0]};
} elsif (ref($_[0])) {
Carp::confess("Can't handle a ".ref($_[0]));
} else {
$_[0] =~ s/(\$Foswiki::cfg{[[A-Za-z0-9{}]+})/_handleExpand($1)/ge;
}
Expand Down

0 comments on commit 56d7276

Please sign in to comment.