Hello everyone,
I have upgrarded my project developed in 2022 version to latest version 2024. I have successfully generated the files in new version. However, it gives the following error:
C:\wamp64\www\typingchecker\src\userfn.php(79): Attempt to assign property “Allowed” on null.I’m using PHP version 8.2. I have tried to check the error on the mentioned line. It is given below:
function MenuItem_Adding(&$Item) {
$UserLevel = CurrentUserLevel();
if($UserLevel==-1) // Admin; Hide Students Menu
{
$ItemID = $Item->Id;
switch($ItemID)
{
case 26:
case 25:
case 23:
//Line 79 where error is displayed $item->Allowed = FALSE;
break;
}
}
$item->Allowed = TRUE;
}
Can someone help me troubleshoot this. Thank you