-Fix crash when a plugin provides callback data with something other than a list reference when called from another plugin

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9013 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-03-08 16:58:40 +00:00
parent 306b07e02f
commit bcf565c6e7

View File

@ -1428,7 +1428,11 @@ sub build_response {
my $resp = shift;
foreach (keys %$resp) {
my $subresp = dclone($resp->{$_});
push (@{$Main::resps->{$_}}, @{$subresp});
if (ref $subresp eq 'ARRAY') {
push (@{$Main::resps->{$_}}, @{$subresp});
} else {
push (@{$Main::resps->{$_}}, $subresp);
}
}
}