z3r0
12-16-2016, 10:35 AM
Hi guys,
I'm just testing out php5.6 on my site and my error logs are filling with "Function eregi() is deprecated" messages that relate to this GARS plugin, from what I've been reading the eregi needs to be replaced with a preg_match, but I just can't get it right.
global $vbulletin;
if (is_object($vbulletin->gars))
{
$this->templatename = $vbulletin->gars->process_postbit();
if ($show['postcount_garstemp'])
{
$show['postcount'] = $show['postcount_garstemp'];
$post['postcount'] = $post['gar_postcount'];
}
if (!eregi('gars', $this->templatename))
{
$show['postcount_garstemp'] = $show['postcount'];
if ($post['postcount'] - $post['gar_postcount'] == 2)
{
$show['postcount'] = 0;
}
}
}
I'm sure it will be a simple fix for one of you guys.
Thanks
I'm just testing out php5.6 on my site and my error logs are filling with "Function eregi() is deprecated" messages that relate to this GARS plugin, from what I've been reading the eregi needs to be replaced with a preg_match, but I just can't get it right.
global $vbulletin;
if (is_object($vbulletin->gars))
{
$this->templatename = $vbulletin->gars->process_postbit();
if ($show['postcount_garstemp'])
{
$show['postcount'] = $show['postcount_garstemp'];
$post['postcount'] = $post['gar_postcount'];
}
if (!eregi('gars', $this->templatename))
{
$show['postcount_garstemp'] = $show['postcount'];
if ($post['postcount'] - $post['gar_postcount'] == 2)
{
$show['postcount'] = 0;
}
}
}
I'm sure it will be a simple fix for one of you guys.
Thanks