PDA

View Full Version : help needed with php7 issues on own mods


mainframe
08-18-2017, 08:40 PM
Dear vBulletin.org community,

I made a few custom mods for my site many years ago and I'm trying to get them to work with php 7. They all work fine with the latest version of php 5.6 but when I use php 7 all places where I use the <vb:each stuff it is no longer working.

### TEMPLATE CODE ###

<vb:each from="topstats_bits" value="topstats_bit">
everything here is just blank, not showing and no errors whatsoever.
</vb:each>

### PHP CODE ###

$templater = vB_Template::Create('topstats_threads');
$templater->register('pagenumber', $pagenumber);
$templater->register('topstats_bits', $topstats_bits);

print_output($templater->render());

###

It's happening in all my custom mods where I use vb:each to list stuff.
Hope you guys can put the finger on this, been searching all day and can't find anything wrong.

Regards,
mainframe

Dave
08-18-2017, 10:38 PM
Any errors in the PHP error log? We can't really do much with the code you've given us. We need more information on how $topstats_bits is populated.

mainframe
08-18-2017, 11:58 PM
Any errors in the PHP error log? We can't really do much with the code you've given us. We need more information on how $topstats_bits is populated.
No errors whatsoever, the page execution also continues as normal it just skips the <vb:each parts.

Attached blurred screenshots of how it looks in php 5.6.3 and 7.1.8

And here's the whole code

<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'topstats');
define('CSRF_PROTECTION', true);

// ################### 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(
'none' => array(
'topstats_articles',
'topstats_forums',
'topstats_threads',
'topstats_users',
),
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################

if ($show['member'] AND !empty($_GET['show']))
{
if (in_array($_GET['show'], array(1,2,4,5,6,10,11)))
{
foreach($vbulletin->forumcache AS $forum)
{
if (!$forum['displayorder'] OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['active']))
{
$excluded_forum_ids .= ',' . $forum['forumid'];
}

// $forumpermissions = fetch_permissions($forum['forumid']);
$forumpermissions = $vbulletin->userinfo['forumpermissions']["{$forum['forumid']}"];

if (!($forumpermissions & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($vbulletin->forumcache["{$forum['forumid']}"]['showprivate'] == 1 OR (!$vbulletin->forumcache["{$forum['forumid']}"]['showprivate'] AND !$vbulletin->options['showprivateforums'])))
{
$excluded_forum_ids .= ',' . $forum['forumid'];
}

if ($_GET['cardsharing'] == 1)
{
if (in_array($forum["forumid"], array(2947,3061,3065,1612,3082)))
{
$included_forum_ids .= ',' . substr($forum['childlist'], 0, -3);
}
}
}

unset($forumpermissions, $forum);

$excluded_forum_ids = substr($excluded_forum_ids, 1);

if ($excluded_forum_ids != '')
{
$excluded_ids = "AND data.forumid NOT IN($excluded_forum_ids)";
}

$included_forum_ids = substr($included_forum_ids, 1);

if ($included_forum_ids != '')
{
$included_ids = "AND data.forumid IN ($included_forum_ids)";
}
}

switch ($_GET['show'])
{
case 1: // Latest Posts
$sqluserid = 'lastposterid';
$sqlsortfield = 'lastpost';
break;
case 2: // Latest Threads
$sqluserid = 'postuserid';
$sqlsortfield = 'dateline';
break;
case 3: // Latest Articles
$sqlsortfield = 'publishdate';
break;
case 4: // Top Threads - Most Replies
$sqluserid = 'postuserid';
$sqlsortfield = 'replycount';
break;
case 5: // Top Threads - Most Views
$sqluserid = 'postuserid';
$sqlsortfield = 'views';
break;
case 6: // Top Threads - Highest Rating
$sqluserid = 'postuserid';
$sqlsortfield = 'voteavg DESC, votenum';
break;
case 7: // Top Articles - Most Comments
$sqlsortfield = 'replycount';
break;
case 8: // Top Articles - Most Views
$sqlsortfield = 'viewcount';
break;
case 9: // Top Articles - Highest Rating
$sqlsortfield = 'ratingtotal';
break;
case 10: // Top Forums - Most Posts
$sqlsortfield = 'replycount';
break;
case 11: // Top Forums - Most Threads
$sqlsortfield = 'threadcount';
break;
case 12: // Top Members - Most Posts
$sqlsortfield = 'posts';
break;
case 13: // Top Members - Most Threads
$sqlsortfield = 'posts';
break;
case 14: // Top Members - Most Uploads
$sqlsortfield = 'uploads';
break;
case 15: // Top Members - Most Shouts
$sqlsortfield = 'dbtech_vbshout_shouts_lifetime';
break;
case 16: // Top Members - Highest Reputation
$sqlsortfield = 'reputation';
break;
case 17: // Top Members - Most Profile Visits
$sqlsortfield = 'profilevisits';
break;
case 18: // New Members
$sqlsortfield = 'userid';
break;
}

$pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT);

$limitlower = ($pagenumber - 1) * 20;
$limitupper = ($pagenumber) * 20;

if ($limitlower < 0)
{
$limitlower = 0;
}

switch ($_GET['show'])
{
case 1:
case 2:
case 4:
case 5:
case 6:
if ($_GET['show'] == 6)
{
$vbulletin->options['showvotes'] = intval($vbulletin->options['showvotes']);

$votequery = "
IF(votenum >= " . $vbulletin->options['showvotes'] . ", votenum, 0) AS votenum,
IF(votenum >= " . $vbulletin->options['showvotes'] . " AND votenum > 0, votetotal / votenum, 0) AS voteavg, votetotal,
";
}

$result = $vbulletin->db->query_read("
SELECT subscribeforumid, user.userid, usergroupid, displaygroupid, username, data.threadid, title, data.lastpost, data.forumid, pollid, replycount, views, " . iif($_GET['show'] == 6, $votequery) . "attach, data.lastpostid, prefixid, taglist
". iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], ", readtime") . "
FROM " . TABLE_PREFIX . "thread AS data
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = $sqluserid)
LEFT JOIN " . TABLE_PREFIX . "subscribeforum AS subscribeforum ON (subscribeforum.forumid = data.forumid AND subscribeforum.userid = " . $vbulletin->userinfo['userid'] . ")
" . iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], "LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid = data.threadid AND threadread.userid = " . $vbulletin->userinfo['userid'] . ")") . "
WHERE NOT ISNULL(data.threadid) AND visible = '1' AND open != '10' $excluded_ids $included_ids
ORDER BY $sqlsortfield DESC
LIMIT $limitlower, 20
");
break;
case 3:
case 7:
case 8:
case 9:
$result = $vbulletin->db->query_read("
SELECT replycount, GROUP_CONCAT(category.categoryid, '|', category) AS category, user.userid, usergroupid, displaygroupid, username, node.nodeid, nodeinfo.title, viewcount, publishdate
FROM " . TABLE_PREFIX . "cms_node AS node
INNER JOIN " . TABLE_PREFIX . "cms_nodeinfo AS nodeinfo ON (nodeinfo.nodeid = node.nodeid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = node.userid)
LEFT JOIN " . TABLE_PREFIX . "cms_nodecategory AS nodecategory ON (nodecategory.nodeid = node.nodeid)
LEFT JOIN " . TABLE_PREFIX . "cms_category AS category ON (category.categoryid = nodecategory.categoryid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = nodeinfo.associatedthreadid)
WHERE contenttypeid = 18 and setpublish = 1
GROUP BY node.nodeid
ORDER BY $sqlsortfield DESC
LIMIT $limitlower, 20
");
break;
case 10:
case 11:
$result = $db->query_read("
SELECT subscribeforumid, data.forumid, replycount, lastpost, threadcount
". iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], ', readtime') . "
FROM " . TABLE_PREFIX . "forum AS data
LEFT JOIN " . TABLE_PREFIX . "subscribeforum AS subscribeforum ON (subscribeforum.forumid = data.forumid AND subscribeforum.userid = " . $vbulletin->userinfo['userid'] . ")
" . iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], "LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forumread.forumid = data.forumid AND forumread.userid = " . $vbulletin->userinfo['userid'] . ")") . "
WHERE replycount > 0 $excluded_ids $included_ids
ORDER BY $sqlsortfield DESC
LIMIT $limitlower, 20
");
break;
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
$result = $db->query_read("
SELECT userid, usergroupid, displaygroupid, username, usertitle, joindate, lastactivity, posts, uploads, reputation, reputationlevelid, dbtech_vbshout_shouts_lifetime
FROM " . TABLE_PREFIX . "user
ORDER BY $sqlsortfield DESC
LIMIT $limitlower, 20
");
break;
}

while ($topstats_bit = $db->fetch_array($result, MYSQL_ASSOC))
{
switch ($_GET['show'])
{
case 1:
case 2:
case 4:
case 5:
case 6:
if ($topstats_bit['lastpost'] > $vbulletin->userinfo['lastvisit'])
{
if ($vbulletin->options['threadmarking'] AND $topstats_bit['readtime'])
{
$threadview = $topstats_bit['readtime'];
}
else
{
$threadview = intval(fetch_bbarray_cookie('thread_lastview', $topstats_bit['threadid']));
}

if ($topstats_bit['lastpost'] > $threadview)
{
$topstats_bit['newpost'] = true;
}
}

if (!empty($topstats_bit['prefixid']))
{
$topstats_bit['prefix'] = $vbphrase["prefix_{$topstats_bit['prefixid']}_title_rich"].": ";
}

$topstats_bit['fullthreadtitle'] = strip_tags($topstats_bit['title']);
$topstats_bit['titletrimmed'] = fetch_trimmed_title($topstats_bit['title'], 40);
$topstats_bit['pageinfo_lastpost'] = array('p' => $topstats_bit['lastpostid']);

if ($_GET['show'] == 1)
{
$topstats_bit['pageinfo_newpost'] = array('goto' => 'newpost');
}

$topstats_bit['taglist'] = strip_tags($topstats_bit['taglist']);
$topstats_bit['fullforumtitle'] = strip_tags($vbulletin->forumcache["{$topstats_bit['forumid']}"]['title_clean']);
$topstats_bit['forumtitle'] = fetch_trimmed_title($topstats_bit['fullforumtitle'], 25);
$topstats_bit['musername'] = fetch_musername($topstats_bit);
$topstats_bit['memberaction_dropdown'] = construct_memberaction_dropdown($topstats_bit);
$topstats_bit['date'] = vbdate($vbulletin->options['dateformat'], $topstats_bit['lastpost'], 1);
$topstats_bit['time'] = vbdate($vbulletin->options['timeformat'], $topstats_bit['lastpost']);

if ($_GET['show'] == 6)
{
if ($topstats_bit['votetotal'] > 0)
{
$topstats_bit['voteavg'] = vb_number_format($topstats_bit['votetotal'] / $topstats_bit['votenum'], 1);
$topstats_bit['rating'] = intval(round($topstats_bit['votetotal'] / $topstats_bit['votenum']));
}

if (empty($topstats_bit['rating']))
{
$topstats_bit['rating'] = 0;
}
}
else
{
$topstats_bit['replycount'] = vb_number_format($topstats_bit['replycount']);
$topstats_bit['views'] = vb_number_format($topstats_bit['views']);
}
break;
case 3:
case 7:
case 8:
case 9:
if ($topstats_bit['publishdate'] > $vbulletin->userinfo['lastvisit'])
{
$topstats_bit['newpost'] = true;
}

$topstats_bit['fullarticletitle'] = strip_tags($topstats_bit['title']);
$topstats_bit['articletitle'] = fetch_trimmed_title($topstats_bit['fullarticletitle'], 40);

$categories = explode(',', $topstats_bit['category']);

foreach ($categories AS $category)
{
$category = explode('|', $category);

$topstats_bit['cat']['categoryid'] = strip_tags($category[0]);
$topstats_bit['cat']['fullcategorytitle'] = strip_tags($category[1]);
$topstats_bit['cat']['categorytitle'] = fetch_trimmed_title($topstats_bit['cat']['fullcategorytitle'], 25);

$topstats_bit['categories'][] = $topstats_bit['cat'];
}

unset($category);

$topstats_bit['musername'] = fetch_musername($topstats_bit);
$topstats_bit['memberaction_dropdown'] = construct_memberaction_dropdown($topstats_bit);
$topstats_bit['date'] = vbdate($vbulletin->options['dateformat'], $topstats_bit['publishdate'], 1);
$topstats_bit['time'] = vbdate($vbulletin->options['timeformat'], $topstats_bit['publishdate']);
$topstats_bit['views'] = vb_number_format($topstats_bit['viewcount']);
break;
case 10:
case 11:
if (!$vbulletin->userinfo['lastvisit'])
{
$topstats_bit['newpost'] = true;
}
else
{
if ($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'])
{
$userlastvisit = (!empty($topstats_bit['readtime']) ? $topstats_bit['readtime'] : (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)));
}
else
{
$forumview = intval(fetch_bbarray_cookie('forum_view', $topstats_bit['forumid']));

$userlastvisit = ($forumview > $vbulletin->userinfo['lastvisit'] ? $forumview : $vbulletin->userinfo['lastvisit']);
}

if ($topstats_bit['lastpost'] AND $userlastvisit < $topstats_bit['lastpost'] AND ($vbulletin->userinfo['forumpermissions'][$topstats_bit['forumid']] & $vbulletin->bf_ugp_forumpermissions['canviewothers']))
{
$topstats_bit['newpost'] = true;
}
}

$topstats_bit['fullforumtitle'] = strip_tags($vbulletin->forumcache["{$topstats_bit['forumid']}"]['title_clean']);
$topstats_bit['forumtitle'] = fetch_trimmed_title($topstats_bit['fullforumtitle'], 50);
$topstats_bit['fulldescription'] = strip_tags($vbulletin->forumcache["{$topstats_bit['forumid']}"]['description_clean']);
$topstats_bit['description'] = fetch_trimmed_title($topstats_bit['fulldescription'], 50);
$topstats_bit['threadcount'] = vb_number_format($topstats_bit['threadcount']);
$topstats_bit['replycount'] = vb_number_format($topstats_bit['replycount']);
break;
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
$topstats_bit['musername'] = fetch_musername($topstats_bit);
$topstats_bit['memberaction_dropdown'] = construct_memberaction_dropdown($topstats_bit);
$topstats_bit['usertitle'] = strip_tags($topstats_bit['usertitle']);
$topstats_bit['join_date'] = vbdate($vbulletin->options['dateformat'], $topstats_bit['joindate'], 1);
$topstats_bit['join_time'] = vbdate($vbulletin->options['timeformat'], $topstats_bit['joindate']);
$topstats_bit['activity_date'] = vbdate($vbulletin->options['dateformat'], $topstats_bit['lastactivity'], 1);
$topstats_bit['activity_time'] = vbdate($vbulletin->options['timeformat'], $topstats_bit['lastactivity']);
$topstats_bit['posts'] = vb_number_format($topstats_bit['posts']);
$topstats_bit['uploads'] = vb_number_format($topstats_bit['uploads']);
$topstats_bit['shouts'] = vb_number_format($topstats_bit['dbtech_vbshout_shouts_lifetime']);

require_once(DIR . '/includes/functions_reputation.php');

$topstats_bit['showreputation'] = true;

cache_permissions($topstats_bit);
fetch_reputation_image($topstats_bit, $topstats_bit['permissions']);
break;
}

$topstats_bits[] = $topstats_bit;
}

$db->free_result($result);
unset($topstats_bit);

switch ($_GET['show'])
{
case 1:
case 2:
case 4:
case 5:
$templater = vB_Template::Create('topstats_threads');
break;
case 6:
$templater = vB_Template::Create('topstats_threads_rating');
break;
case 3:
case 7:
case 8:
case 9:
$templater = vB_Template::Create('topstats_articles');
break;
case 10:
case 11:
$templater = vB_Template::Create('topstats_forums');
break;
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
$templater = vB_Template::Create('topstats_users');
break;
}

$templater->register('pagenumber', $pagenumber);
$templater->register('topstats_bits', $topstats_bits);

print_output($templater->render());
}
?>

Stingray27
08-19-2017, 12:01 AM
You also havent shown what code is actually inside the foreach loop.

Dave
08-19-2017, 12:04 AM
Did you also upgrade to the latest version of vBulletin that supports PHP 7?

Stingray27
08-19-2017, 12:05 AM
No errors whatsoever
That seems very unlikely, unless you have somehow disabled all error logging, are you sure you are checking the server logs ?

mainframe
08-19-2017, 12:06 AM
You also havent shown what code is actually inside the foreach loop.

That's just plain html code, even if I would put XXX there it should repeat the code inside for the number of results.

Did you also upgrade to the latest version of vBulletin that supports PHP 7?
Yes, vBulletin works fine. it's just my own mods that act this way :-(

--------------- Added 1503109057 at 1503109057 ---------------

That seems very unlikely, unless you have somehow disabled all error logging, are you sure you are checking the server logs ?
That's what I find strange as well, if there was an error I probably wouldn't have to spend
hours tracking it down. I caused a few php errors on purpose and those showed up just fine.

Dave
08-19-2017, 12:26 AM
When you add var_dump($topstats_bits); before you output the template, it shows all data properly that should be passed to the template?

mainframe
08-19-2017, 12:27 AM
forgot this part.. sorry, it's been a few years since I made it.

It's a plugin on forumhome_start to initially display the mod.
The php file I posted earlier is used to retrieve data using AJAX


if ($show['member'] AND (THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'cardsharing'))
{
foreach($vbulletin->forumcache AS $forum)
{
if (!$forum['displayorder'] OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['active']))
{
$excluded_forum_ids .= ',' . $forum['forumid'];
}

$forumpermissions = $vbulletin->userinfo['forumpermissions']["{$forum['forumid']}"];

if (!($forumpermissions & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($vbulletin->forumcache["{$forum['forumid']}"]['showprivate'] == 1 OR (!$vbulletin->forumcache["{$forum['forumid']}"]['showprivate'] AND !$vbulletin->options['showprivateforums'])))
{
$excluded_forum_ids .= ',' . $forum['forumid'];
}

if (THIS_SCRIPT == 'cardsharing')
{
if (in_array($forum['forumid'], array(2947,3061,3065,3150)))
{
$included_forum_ids .= ',' . substr($forum['childlist'], 0, -3);
}
}
}

unset($forumpermissions, $forum);

$excluded_forum_ids = substr($excluded_forum_ids, 1);

if ($excluded_forum_ids != '')
{
$excluded_ids = "AND data.forumid NOT IN($excluded_forum_ids)";
}

$included_forum_ids = substr($included_forum_ids, 1);

if ($included_forum_ids != '')
{
$included_ids = "AND data.forumid IN ($included_forum_ids)";
}

$result = $vbulletin->db->query_read("
SELECT subscribeforumid, user.userid, usergroupid, displaygroupid, username, data.threadid, title, data.lastpost, data.forumid, pollid, replycount, views, attach, data.lastpostid, prefixid, taglist
". iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], ', readtime') . "
FROM " . TABLE_PREFIX . "thread AS data
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = lastposterid)
LEFT JOIN " . TABLE_PREFIX . "subscribeforum AS subscribeforum ON (subscribeforum.forumid = data.forumid AND subscribeforum.userid = " . $vbulletin->userinfo['userid'] . ")
" . iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], "LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid = data.threadid AND threadread.userid = " . $vbulletin->userinfo['userid'] . ")") . "
WHERE NOT ISNULL(data.threadid) AND visible = '1' AND open != '10' $excluded_ids $included_ids
ORDER BY lastpost DESC
LIMIT 20
");

while ($topstats_bit = $db->fetch_array($result, MYSQL_ASSOC))
{
if ($topstats_bit['lastpost'] > $vbulletin->userinfo['lastvisit'])
{
if ($vbulletin->options['threadmarking'] AND $topstats_bit['readtime'])
{
$threadview = $topstats_bit['readtime'];
}
else
{
$threadview = intval(fetch_bbarray_cookie('thread_lastview', $topstats_bit['threadid']));
}

if ($topstats_bit['lastpost'] > $threadview)
{
$topstats_bit['newpost'] = true;
}
}

if (!empty($topstats_bit['prefixid']))
{
$topstats_bit['prefix'] = $vbphrase["prefix_{$topstats_bit['prefixid']}_title_rich"].": ";
}

$topstats_bit['fullthreadtitle'] = strip_tags($topstats_bit['title']);
$topstats_bit['titletrimmed'] = fetch_trimmed_title($topstats_bit['title'], 40);
$topstats_bit['pageinfo_lastpost'] = array('p' => $topstats_bit['lastpostid']);
$topstats_bit['pageinfo_newpost'] = array('goto' => 'newpost');
$topstats_bit['taglist'] = strip_tags($topstats_bit['taglist']);
$topstats_bit['fullforumtitle'] = strip_tags($vbulletin->forumcache["{$topstats_bit['forumid']}"]['title_clean']);
$topstats_bit['forumtitle'] = fetch_trimmed_title($topstats_bit['fullforumtitle'], 25);
$topstats_bit['musername'] = fetch_musername($topstats_bit);
$topstats_bit['memberaction_dropdown'] = construct_memberaction_dropdown($topstats_bit);
$topstats_bit['date'] = vbdate($vbulletin->options['dateformat'], $topstats_bit['lastpost'], 1);
$topstats_bit['time'] = vbdate($vbulletin->options['timeformat'], $topstats_bit['lastpost']);
$topstats_bit['replycount'] = vb_number_format($topstats_bit['replycount']);
$topstats_bit['views'] = vb_number_format($topstats_bit['views']);

$topstats_bits[] = $topstats_bit;
unset($topstats_bit);
}

$db->free_result($result);

$templater = vB_Template::Create('topstats');
$templater->register('topstats_bits', $topstats_bits);

$topstats['topstats'] = $templater->render();

vB_Template::preRegister('FORUMHOME', $topstats);
}


--------------- Added 1503110181 at 1503110181 ---------------

When you add var_dump($topstats_bits); before you output the template, it shows all data properly that should be passed to the template?

You're on to something here, $topstats_bits = NULL on PHP 7.1.8
I'm new to php 7, maybe it doesn't like the way the array is initialized?

Dave
08-19-2017, 01:10 AM
What if you add $topstats_bits = []; on line 31, after requiring the global file?

mainframe
08-19-2017, 01:14 AM
What if you add $topstats_bits = []; on line 31, after requiring the global file?
var_dump changes from NULL to array(0) { }

mainframe
08-20-2017, 06:24 AM
any idea what would cause this? only thing I'm sure of atm is that it's a php 7 thing

MarkFL
08-20-2017, 06:48 AM
Try changing this line:

while ($topstats_bit = $db->fetch_array($result, MYSQL_ASSOC))

to:

while ($topstats_bit = $db->fetch_array($result))

mainframe
08-20-2017, 07:33 AM
Thank MarkFL,

That did the trick :-) everything working without issues again