Congratulations! You just found out why using globals sux teh bigtime...
About the GLOBALS: you find it in the manual here
The variable could be set anywhere in the code, and when the other guy relied on the "register_globals" setting set to "on"....then you will even have to find every occurence of $argv and make sure that in the context where you find it, it really refers to the global variable and not to a locally declared one.
If it is an option (time is a factor) try and get rid of anything in the global scope...
Bjom