0

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:

http://pastebin.com/9cJXefTk

can anyone look at the code to see whats the problem? i would apreciate alot, thanks

2 Answers2

0

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;
Dante Cervantes
  • 323
  • 1
  • 3
  • 14
0

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;
Mureinik
  • 297,002
  • 52
  • 306
  • 350