This question already has an answer here:
im very new in coding, im trying to install this mod http://fluxbb.org/resources/mods/easy-avatar/ to my fluxbb forum (last version, 5.8), and im getting this error:
Parse error: syntax error, unexpected T_ELSE in public_html/profile.php on line 87
this is the profile.php modified as the readme says:
can anyone look at the code to see whats the problem? i would apreciate alot, thanks
</div>
you are forgotten the semicolons, instead of this :
if(isset($matches[1]))
$max = (int) $matches[1];
switch (strtolower($last))
{
case 'g':
case 'gb':
$max *= 1024;
case 'm':
case 'mb':
$max *= 1024;
case 'k':
case 'kb':
$max *= 1024;
}
else
$max = 1048576;
try this
if(isset($matches[1])){
$max = (int) $matches[1];
switch (strtolower($last))
{
case 'g':
case 'gb':
$max *= 1024;
case 'm':
case 'mb':
$max *= 1024;
case 'k':
case 'kb':
$max *= 1024;
}
}
else
$max = 1048576;
You are missing brackets around the if
statement:
if(isset($matches[1]))
{ # Here
$max = (int) $matches[1];
switch (strtolower($last))
{
case 'g':
case 'gb':
$max *= 1024;
case 'm':
case 'mb':
$max *= 1024;
case 'k':
case 'kb':
$max *= 1024;
}
} # And here
else
$max = 1048576;