vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Array Dump on Forum (https://vborg.vbsupport.ru/showthread.php?t=293561)

1only 01-03-2013 06:38 PM

Array Dump on Forum
 
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'$vbulletinERRTYPE_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'truetrue));
    } 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?


All times are GMT. The time now is 09:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01021 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete