As supected, $folderid was empty and not defined. vBulletin 3.5.0 no longer uses INT .
This:
PHP Code:
$vbulletin->input->clean_array_gpc($_REQUEST, array('folderid' => INT));
Should Be:
PHP Code:
$vbulletin->input->clean_array_gpc($_REQUEST, array('folderid' => TYPE_INT));
But for some reason that was not working, i'm not going to lose sleep over why that isn't working as it should so I just replaced it with
PHP Code:
$folderid = $_REQUEST['folderid'];
Does the job for now.