Quote:
Originally Posted by CharlieDelta
Getting this error when I try to go to the ranks page. Using Vb 4.1.5.
Code:
Fatal error: Cannot redeclare construct_depth_mark() (previously declared in //....html/testvb/ranks.php:97) in /....html/testvb/includes/adminfunctions.php on line 1907
|
In ranks.php find:
PHP Code:
// ###################### Start makedepthmark #######################
function construct_depth_mark($depth, $depthchar, $depthmark = '')
{
// repeats the supplied $depthmark for the number of times supplied by $depth
// and appends it onto $depthmark
for ($i = 0; $i < $depth; $i++)
{
$depthmark .= $depthchar;
}
return $depthmark;
}
Replace with:
PHP Code:
if (!function_exists('construct_depth_mark'))
{
// ###################### Start makedepthmark #######################
function construct_depth_mark($depth, $depthchar, $depthmark = '')
{
// repeats the supplied $depthmark for the number of times supplied by $depth
// and appends it onto $depthmark
for ($i = 0; $i < $depth; $i++)
{
$depthmark .= $depthchar;
}
return $depthmark;
}
}
*The reason for the error is simple, as you can see by the second part of your error this "function" was called again because it's defined twice - in short the guys who originally made the Awards mod (which this is a conversion of that) simply copy/pasted the function to suite the mod not taking into affect they should not. I've wrapped it in a simple conditional to check for the function first. Update will be in the next release, in the meantime please edit ranks.php accordingly if you encounter this issue as CharlieDelta has
.
**Also, if your reading this and have the "Yet Another Awards System" installed you should do this same exact edit in awards.php