diff --git a/cgi/sugar_random.pl b/cgi/sugar_random.pl index c7b8a00fe7465..1fcf910ea857b 100755 --- a/cgi/sugar_random.pl +++ b/cgi/sugar_random.pl @@ -37,7 +37,7 @@ # this script is used by howmuchsugar to redirect to a new product randomly -my $r = shift; +my $r = Apache2::RequestUtil->request(); # read site name in apache provided header my $lang = $r->headers_in->{"X-Site-Lang"} // 'en';