SC updates damaged working App - help

I have had an form App to edit user password. It worked fine. After some SC updates I cannot use it anymore. I get errors (although nothing was changed in this App).

Parse error: syntax error, unexpected '$this' (T_VARIABLE), expecting '(' in C:\Program Files (x86)\NetMake\v81\wwwroot\scriptcase\app\TECREP\fm_sec_user_password\fm_sec_user_password_apl.php on line 5220 

It is really hard to figure out what’s wrong in the code when simple form has 52 thousand lines!
here is a fragment…

function COID_onChange($coid)
{
$_SESSION['scriptcase']['fm_sec_user_password']['contr_erro'] = 'on';
                        
$original_coid = $this->coid;
$original_coid = $this->coid;

if $this->coid  !== 0
    {
    {$WOID}=0;
    {$CUID}=0;
    }
    

$modificado_coid = $this->coid;
$modificado_coid = $this->coid;
$this->nm_formatar_campos('coid');
if ($original_coid !== $modificado_coid || (isset($bFlagRead_coid) && $bFlagRead_coid))
{
    $this->ajax_return_values_coid(true);
}
if ($original_coid !== $modificado_coid || (isset($bFlagRead_coid) && $bFlagRead_coid))
{
    $this->ajax_return_values_coid(true);
}
fm_sec_user_password_pack_ajax_response();
exit;


highlighted line 5220

any ideas ?

PS-------------------------------------------------------------------------------------------------------
I exported 2 zipped Apps for NetMake or anybody who would like to test it but unfortunately I do not see an option to upload ZIP file here (hwich is very bad).

Below is a SQL script to create a table. This is basiacally original Security Module table with few extra fields added

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

CREATE TABLE IF NOT EXISTS `sec_users` (
  `login` varchar(32) COLLATE utf8_bin NOT NULL,
  `pswd` varchar(32) COLLATE utf8_bin NOT NULL,
  `name` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `email` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `active` varchar(1) COLLATE utf8_bin DEFAULT NULL,
  `activation_code` varchar(32) COLLATE utf8_bin DEFAULT NULL,
  `priv_admin` varchar(1) COLLATE utf8_bin DEFAULT NULL,
  `COID` int(11) DEFAULT NULL COMMENT 'Accociates Only',
  `WOID` int(11) DEFAULT NULL COMMENT 'Workers Only',
  `CUID` int(11) DEFAULT NULL COMMENT 'Customers Only',
  PRIMARY KEY (`login`),
  UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


Arthur -

​ Provided you are still working on this, I would suggest enabling XDEBUG for PHP (https://xdebug.org/download.php) and executing your application through NetBeans (http://netbeans.org/)

​ After adding the appropriate settings to enable XDEBUG in your PHP.INI and the NetBeans IDE, I would suggest placing a break in the function ‘COID_onChange($coid)’ to step through your code a line at a time to resolve the problem.

Are you using the same version of PHP now, that you did prior to the SC upgrade?

​- Kevin

Error is on line
if $this->coid !== 0
{
{$WOID}=0;
{$CUID}=0;
}

On PHP an if should be wrapped between (). should be
if ($this->coid !== 0)
{
{$WOID}=0;
{$CUID}=0;
}

If this is code from an event than I wonder that it has worked before. If it’s from standard SC code then it needs to be reported as a bug.

Exactly. That ‘if <expression> { … }’ may be one of many that have to be addressed.

No Albert this happened without me adding a single line of code or modifying anything. Opened the project generated - all works fine. Applied update through SETTINGS option, regenerated - got errors. As simple as this. I assume that NetMake is using some libraries from a 3rd party. When those are updated they push them into SC then they are downloaded. Thsoe libs are probably never tested by SC and that’s what happens. I understand that testing all libs SC uses with every update is kinda hard with limited personnel but testing the changes (by DIFF-ing the files) should not be hard to implement) so at least they should know when the changes were applied and based on that post some warning messages when SC is updated so one can do a full backup first.
I know you will advise here to do a full backup anyway, but on my new PC the SC + PROJECTS take about 2+ hours to backup and often I do not have that time during the day. I only do backup when I sleep.