Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2019, 01:16 PM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Cannot use a scalar value as an array

Since updating one of my forums to vb3.8.11 I've been receiving the following error in my logs.

Code:
PHP Warning:  Cannot use a scalar value as an array in C:\root\Forums\mysite\search.php on line 2523
Any ideas on what the cause could be?
Reply With Quote
  #2  
Old 07-16-2019, 02:08 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My best guess is you have an undefined variable in a modification.

Are you using a custom search mod or tool?

You should define the variable.

$var = array();
Reply With Quote
  #3  
Old 07-16-2019, 03:41 PM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by In Omnibus View Post
My best guess is you have an undefined variable in a modification.

Are you using a custom search mod or tool?
I'm not using any search mods.

Quote:
You should define the variable.

$var = array();
Where would I do that?

Thanks
Reply With Quote
  #4  
Old 07-16-2019, 06:03 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Id suggest looking for any old plugins you had installed prior to the upgrade, example is sphinx search plugin for vb 3.x.x & remove them.
Reply With Quote
Благодарность от:
In Omnibus
  #5  
Old 07-18-2019, 05:05 AM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've looked through all the plugins and can't find any that interact with search, I'll keep digging around and try and find what action causes the errors.
Reply With Quote
  #6  
Old 07-18-2019, 07:30 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
// cannot view / search this forum, or does not have forum password
			unset($tmp["$forumid"]);
		}
		else if (!($fperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) AND ($search['showposts'] OR ($display['options']['action'] != 'getnew' AND $display['options']['action'] != 'getdaily' AND !$search['titleonly'])))
		{
			unset($tmp["$forumid"]);
		}
		else
		{
			if ($vbulletin->userinfo['userid'])
			{
				$lastread["$forumid"] = max($forum['forumread'], (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)));
Line 2523 			}
			else
			{
				$forumview = intval(fetch_bbarray_cookie('forum_view', $forumid));

				//use which one produces the highest value, most likely cookie
				$lastread["$forumid"] = ($forumview > $vbulletin->userinfo['lastvisit'] ? $forumview : $vbulletin->userinfo['lastvisit']);
			}

Id chk forums with passwds, make sure its not +++++ing about a forum with a old passwd & a char it has in it.

Any getdaily or getnew code/hacks you installed

etc etc
Reply With Quote
  #7  
Old 07-18-2019, 12:12 PM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No forums with passwords and I've just checked all plugins for getdaily & getnew but didn't turn anything up.

The error only seems to happen a couple of times a day but when it does I get 15-25 errors in less than a second, I'd checked crons but nothing matches the times and I've clicked just about everywhere I can on the site that triggers a search, but nothing has started it.

The error really isn't a problem, I just like having clean log files so I'll keep plugging away at finding the cause.
Reply With Quote
  #8  
Old 07-18-2019, 02:41 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by z3r0 View Post
No forums with passwords and I've just checked all plugins for getdaily & getnew but didn't turn anything up.

The error only seems to happen a couple of times a day but when it does I get 15-25 errors in less than a second, I'd checked crons but nothing matches the times and I've clicked just about everywhere I can on the site that triggers a search, but nothing has started it.

The error really isn't a problem, I just like having clean log files so I'll keep plugging away at finding the cause.
Your PHP error log should tell you the script causing the error if you have the errors set to verbose output.

If you open the file in a text editor what is the content of line 2523 per the error you originally posted?

C:\root\Forums\mysite\search.php on line 2523
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09346 seconds
  • Memory Usage 2,238KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (1)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete