Fixing fractional array indexes in the RandomAssetProxy macro.

This commit is contained in:
Colin Kuskie 2009-06-19 18:09:37 +00:00
parent 35749ff8c6
commit d9afb768f5
2 changed files with 2 additions and 1 deletions

View file

@ -41,7 +41,7 @@ sub process {
if (defined $asset) {
my $children = $asset->getLineage(["children"]);
#randomize;
my $randomAssetId = $children->[rand(scalar(@{$children}))];
my $randomAssetId = $children->[int(rand(scalar(@{$children})))];
my $randomAsset = WebGUI::Asset->newByDynamicClass($session,$randomAssetId);
if (defined $randomAsset) {
if ($randomAsset->canView) {