Hi all,
I have a whole series of tests, using one array of permissions. THs is the structure:
case 5: //change menus // Needs specific page edit right too
if(! $permitted['menu']) {$message[0] = false; $message[1] = "You are not allowed to modify the menu structure";} else {
if( $permitted['menu'] and $allowed[$pageid]) {$message[0] = true;} else {$message[0] = false; $message[1] = "I am sorry, but you are not allowed to change the menusettings for this page.";}
}
break;
The odd thing is.. I get for some lines an error for $permitted, and for some lines not.
error:
Notice: Undefined variable: permitted in \includes\functions\isauthorized_v1.php on line 62
So.. Line 62 is the second line in the snippet above. For 63 I do not get an error..
I get 10 errors, while the variable is used 22 times on the page...
Any suggestions? I am about to pull myself a bold scalp here.
edit: Needless to say: The variable is perfectly fine. I can print_r() it, which will show me the values. But the pages throws an error, claiming it doesn't exists. errors: E_All.