This code is old. If you update to PHP 5.4, it will not function at all.
$HTTP_GET_VARS was replaced with $_GET superglobal in PHP 4.1. Registered long arrays have been supported the last decade or so for legacy code only.
You are not creating
$get_vars in that code anywhere. So you are triggering an error and providing the function call with null. This would be an existing querystring; you can use the $_GET and build a string (looping or using http_build_query), or pull it from the server's QUERY_STRING. I'd suggest http_build_query as you can pop off the from before using it.