Yea right lol, syntax error my rear end.
Can anyone see the syntax error here because for the life of me I cannot see it.
if($mybb->usergroup['cancp'] == 1 || $mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'])
{
// Code here........
}
Because no such thing such as $mybb->user['ismoderator'] . There is $mybb->usergroup['issupermod'] though.
I might be wrong here though.
Try that.
What lol
Yes there is, this is a "Syntax" error, I can put $mybb->user['fyugryuebfberfbweyiruiu'] if I want to.
Syntax error means theres a bracket or something stupid like that missing.
I know, I was just hitting my shot. Where is the code that you found, any file or such? global.php?
Okay, try this?
if(($mybb->usergroup['cancp'] == 1 || $mybb->user['ismoderator']) && $mybb->usergroup['canmodcp'])
{
// Code here........
}
PHP isn't always too great at getting line numbers correct when showing error messages. it could be a syntax error somewhere near that code rather than that code itself.
Saying that, I would certainly clean up that if statement anyway using brackets. Currently it's hard to tell what the actual logic of the operation is.