The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Warning: Illegal string offset 'do' in [path]/includes/functions_online.php on line 5
I'm running vB 4.2.1, PHP version 5.4.30 MySQL version 5.6.16, and just noticed when I go here:
[removed for now] I get the above error. How can I resolve this? I just noticed this today. Thanks. |
#2
|
||||
|
||||
Does the same thing happen with all mods disabled?
|
#3
|
|||
|
|||
Check error_log in ftp root
|
#4
|
|||
|
|||
What do you have at the beginning of file includes/functions_online.php? That's a strange error because there's nothing near line 5 that should be doing that, unless someone has added some code to the beginning.
|
#5
|
|||
|
|||
All the above suggestions are very worthwhile and I could not agree more with @KH99. Usually, that error occurs in php 5.4 with the slight strengthening of data-type checking. Typically in vbulletin it is because we are sending a string, when we are asking for an array, or vice-versa. In most cases you just suppress the warning.
If you are using php v5.4 you should be using vb4.2.2, as vb4.2.1 was never vetted for PHP v5.4, by vBulletin. Check your logs and investigate why PHP is reporting an improper line number as @KH99 suggested. |
#6
|
|||
|
|||
Thanks for the info guys. I was about to test with the mods off, but the error isn't coming up no more. No idea why. Any ideas why this would be?
The top of the includes/functions_online.php file looks like: Code:
<?php /*======================================================================*\ || #################################################################### || || # vBulletin 4.2.1 - Licence Number VBFXXXXXXX || # ---------------------------------------------------------------- # || || # Copyright ?2000-2013 vBulletin Solutions Inc. All Rights Reserved. || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || #################################################################### || \*======================================================================*/ // ###################### Start userlocation ####################### function fetch_user_location_array($userinfo) { global $vbulletin; $datecut = TIMENOW - $vbulletin->options['cookietimeout']; if (($userinfo['invisible'] == 0 OR $userinfo['userid'] == $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) AND // Check if user is hidden $vbulletin->options['WOLenable'] AND // Is WOL enabled? ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonline']) AND // Does viewing user have WOL access? ($userinfo['lastactivity'] > $datecut AND $userinfo['lastvisit'] != $userinfo['lastactivity']) AND // Is user actually online? $location = $vbulletin->db->query_first("SELECT location, badlocation FROM " . TABLE_PREFIX . "session WHERE userid = $userinfo[userid] AND lastactivity > $datecut ORDER BY lastactivity DESC LIMIT 1")) { $userinfo['location'] = $location['location']; $userinfo['badlocation'] = $location['badlocation']; $userinfo = process_online_location($userinfo); convert_ids_to_titles(); $userinfo = construct_online_bit($userinfo); } return $userinfo; } As for PHP 5.4, I read that 4.2.1 was compatible with "PHP version 5.2.0 or greater". Is this not correct? |
#7
|
||||
|
||||
You should edit that post and remove your license number from the code. No need to post that on public.
|
#8
|
|||
|
|||
That looks right to me. I guess I just don't understand the error message.
Also, I edited your post to remove the license number. |
#9
|
||||
|
||||
vB4.2.1 is not compatible with PHP5.4, only vB4.2.2 (and above) is compatible with PHP5.4.
|
Благодарность от: | ||
AusPhotography |
#10
|
|||
|
|||
Thanks for editing that out, my mistake.
Quote:
I won't be able to do the upgrade for a week or two. Will there be any issues if I wait this long or should I make the upgrade more urgent? Thanks. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|