Probably need to play around with quotes and braces
30 seconds with google later, I found this...
https://vborg.vbsupport.ru/showthread.php?t=98009
Code:
Object-Type" Variables ($vbulletin->GPC['somevar']).
Do use single quotes, but wrap such variables into figure brackets. One valid example is {$vbulletin->GPC['somevar']}.
If you attempt using $vbulletin->GPC['somevar'] or $vbulletin->GPC[somevar], you will get an error
However its 3.5, not 3.6, I am not sure the {} are needed. I recommend having a play with braces and quotes. Alternatively, alias the forum in code, and reference the alias.