Hello everyone! I was working with my forum and installing a really great mod that I used to use when I was a server admin for another forum; and I keep getting an array-dump that displays information from my vBulletin database included salted passwords! Obviously this is undesirable so I wanted to know if anyone could help me.
The mod is Nova Bump Thread (very outdated, but I won't upgrade, the new version isn't very good for my needs).
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'bumpthread');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
// Get the thread id
$vbulletin->input->clean_gpc('g', 't', TYPE_UINT);
// Make sure all the permissions are right
if(($vbulletin->options['nova_bumpthread_on'] == 1) AND (can_moderate() OR $threadinfo['postuserid'] == $vbulletin->userinfo['userid'])){
$threadinfo = fetch_threadinfo($vbulletin->GPC['t']);
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$threadman->set_existing($threadinfo); //ERROR ON THIS LINE
$threadman->set('lastpost', TIMENOW);
$threadman->save();
if(!function_exists('build_forum_counters')){
require_once('./includes/functions_databuild.php');
}
// Rebuild the forum info
build_forum_counters($threadinfo['forumid']);
// Redirect to the forum
$vbulletin->url = "forumdisplay.php?f=" . $threadinfo['forumid'];
eval(print_standard_redirect('redirect_bump', true, true));
} else {
print_no_permission();
}
// #######################################################################
// ########################## END MAIN SCRIPT ############################
// #######################################################################
?>
Above is the bthread.php file in which is used to bump a thread; the script actually works perfectly, but when accessed directly it throws a fatal error
Code:
Fatal error: existing data passed is not an array. Called set_existing in [path]/bthread.php on line 36 in [path]/includes/class_dm.php on line 236.
and then proceeds to dump a huge amount of database information. Anyone able to give me any information as to how I would go about fixing this issue?