News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Undefined variable: boardurl - when editing Membergroups

Started by Siezmik, April 30, 2010, 02:46:14 PM

Previous topic - Next topic

Siezmik

This message just started appearing yesterday, and only seems to pop up when I got to edit MemberGroups.  I've searched and can't find anyplace that $boardurl isn't defined as global, but maybe I'm just missing something.  Any thoughts on where I should check?

******/forum/index.php?action=admin;area=membergroups;f9db199451=ca309c42c30716c4600810c6d8177e18
8: Undefined variable: boardurl
File: ******/forum/Sources/ManageMembergroups.php(299) : runtime-created function
Line: 10

The site is running SMF v2.0 RC3, with a handful of mods and a custom theme.  Besides the error, everything seems to be working just fine. :o

Arantor

Please attach your ManageMembergroups.php file here.


Arantor

Yay for one of your mods.

Offending code:

'data' => array(
'function' => create_function('$rowData', '
global $settings;

$stars = explode(\'#\', $rowData[\'stars\']);

if (empty($stars[0]) || empty($stars[1]))
return \'\';
else
{
$star_image = sprintf(\'<img src="%1$s/%2$s" alt="*" border="0" />\', $boardurl . \'/ranks\', $stars[1]);
return str_repeat($star_image, $stars[0]);
}
'),
),


Fixed version:

'data' => array(
'function' => create_function('$rowData', '
global $settings, $boardurl;

$stars = explode(\'#\', $rowData[\'stars\']);

if (empty($stars[0]) || empty($stars[1]))
return \'\';
else
{
$star_image = sprintf(\'<img src="%1$s/%2$s" alt="*" border="0" />\', $boardurl . \'/ranks\', $stars[1]);
return str_repeat($star_image, $stars[0]);
}
'),
),



Advertisement: