vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Error: Warning: in_array() (https://vborg.vbsupport.ru/showthread.php?t=156778)

Busterking 09-01-2007 11:57 AM

Error: Warning: in_array()
 
I just don't know how to fix it so that this error doesn't show up on some of my threads:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /showthread.php(1967) : eval()'d code on line 364

Your help would be greatly appreciated.

Line 364:

// set $perpage

$perpage = sanitize_maxposts($vbulletin->GPC['perpage']);

// ************************************************** ****************************** *
// set post order
if ($vbulletin->userinfo['postorder'] == 0)
{
$postorder = '';
}
else
{
$postorder = 'DESC';
}

// ************************************************** ****************************** *
// get thread info
$thread = verify_id('thread', $threadid, 1, 1);
$threadinfo =& $thread;

($hook = vBulletinHook::fetch_hook('showthread_getinfo')) ? eval($hook) : false;

// ************************************************** ****************************** *
// check for visible / deleted thread
if (((!$thread['visible'] AND !can_moderate($thread['forumid'], 'canmoderateposts'))) OR ($thread['isdeleted'] AND !can_moderate($thread['forumid'])))
{
eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
}

// ************************************************** ****************************** *
// jump page if thread is actually a redirect
if ($thread['open'] == 10)
{
exec_header_redirect('showthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "t=$thread[pollid]");

Opserty 09-01-2007 03:19 PM

Its not a problem with the files, its due to a plugin. Check in plugin manager for plugins with the hook location 'showthread_getinfo' go through and disable them one by one to find out which is causing the error.

Busterking 09-01-2007 05:14 PM

I disabled all my plugins and that error is still showing.

Opserty 09-01-2007 05:23 PM

Upload a fresh version of the showthread.php file (i.e. download it again from vbulletin.com and upload it)

I'm pretty sure the eval'd error refers to the eval() of the hook though.

You can disable hooks by putting

PHP Code:

define('DISABLE_HOOKS'true); 

Just under the <?php opening tag.

Busterking 09-01-2007 05:39 PM

did both, still no luck.

Reverting the SHOWTHREAD template did the trick.

Thanks for helping.


All times are GMT. The time now is 08:19 PM.

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.01539 seconds
  • Memory Usage 1,715KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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