From 579006065565a3e52850a1ac3afb9918080378d4 Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Mon, 17 Oct 2005 20:09:57 +0000 Subject: [PATCH] fix :( --- lib/WebGUI/Macro/RandomAssetProxy.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/WebGUI/Macro/RandomAssetProxy.pm b/lib/WebGUI/Macro/RandomAssetProxy.pm index f693ce577..c6896af0e 100644 --- a/lib/WebGUI/Macro/RandomAssetProxy.pm +++ b/lib/WebGUI/Macro/RandomAssetProxy.pm @@ -23,8 +23,7 @@ sub process { my $children = $asset->getLineage(["children"]); #randomize; srand; - WebGUI::ErrorHandler::warn(rand(scalar(@{$children}))); - my $randomAssetId = $children->[$index1]; + my $randomAssetId = $children->[rand(scalar(@{$children}))]; my $randomAsset = WebGUI::Asset->newByDynamicClass($randomAssetId); if (defined $randomAsset) { $randomAsset->toggleToolbar;