Fixing fractional array indexes in the RandomAssetProxy macro.
This commit is contained in:
parent
35749ff8c6
commit
d9afb768f5
2 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue