diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 174ffdcbc..83f27e525 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -20,6 +20,7 @@ - fixed: Add progress bars for promote and demote. - fixed: Add progress bars for set rank in the Asset Manager. - fixed: SurveyJSON database bloating + - fixed #10548: Macro RandomAssetProxy failure to be random 7.7.10 - Made a change to LDAP auth that adds an OR to that query so that it also searches for a row with fieldData REGEXP '^uid=(value-from-ldap-directory-server),'. (Wes Morgan) diff --git a/lib/WebGUI/Macro/RandomAssetProxy.pm b/lib/WebGUI/Macro/RandomAssetProxy.pm index 2f33fb45b..8d333de15 100644 --- a/lib/WebGUI/Macro/RandomAssetProxy.pm +++ b/lib/WebGUI/Macro/RandomAssetProxy.pm @@ -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) {