just started getting this error
Quote:
gWoWEvents Armory Import
Fatal error: Cannot use string offset as an array in D:\Hosting\4072979\html\includes\cron\cron.gwoweve nts.charinfo.php on line 53
|
Any resolve to this issue ?
Update: I ended up doing this to resolve my issue and all seems to work.
Quote:
Originally Posted by LostPhoenix
Here is my hack for those of us who have hosts that don't like the cron. It's not perfect but it does work.
Find the following code in cron.gwowevents.charinfo.php
Code:
if ($character['characterInfo'] && $character['characterInfo']['characterTab']['characterBars']['health']['effective'])
{
$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . " `armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
}
else
{
$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE `realmchar` = '" . $char['realmchar'] . "'");
}
and change it to:
Code:
$dbhost = '';
$dbname = '';
$dbuser = '';
$dbpasswd = '';
if ($character['characterInfo'] && $character['characterInfo']['characterTab']['characterBars']['health']['effective'])
{
//$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . " `armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
@ $db2 = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
mysql_select_db("$dbname",$db2);
mysql_query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . " `armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'", $db2);
mysql_close($db2);
} else {
//$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE `realmchar` = '" . $char['realmchar'] . "'");
@ $db2 = mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
mysql_select_db("$dbname",$db2);
mysql_query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE `realmchar` = '" . $char['realmchar'] . "'", $db2);
mysql_close($db2);
}
Obviously you have to add your database info. Until I take the time to learn vbulletin and fix it properly lol.
This will put more stress on your SQL server as it opens and closes a connection each time it updates the user.
|