After updating to php 7.0 with fabrik 3.6 and joomla 3.7 a calculated field sends the error page with the following message: syntax error, unexpected 'if' (T_IF)
no problem with php 5.6
The php calculation is as follows:
$ Dummy = '{tm_test___Vita}';
If ($ dummy <0.94)
{
Return 'Hidden';
}
else
{
Return $ dummy;
}
$ M = if ('{tm_test___Vita_raw}' <1) {$ spoints = 0;}
$ F = if ((int) round (('{tm_test_vita_raw}' / '{tm_test ___ Fianchi_raw}') * 100) / 100; <0.94) {$ spoints = 0;
If ((int) '{tm_test ___ sex_allen}' == Male) {$ spoints = $ dummy;}
else
If ((int) '{tm_test ___ sex_allen}' == Female) {$ spoints = $ f;}
else
$ Spoints = "ND";
Return $ spoints;
no problem with php 5.6
The php calculation is as follows:
$ Dummy = '{tm_test___Vita}';
If ($ dummy <0.94)
{
Return 'Hidden';
}
else
{
Return $ dummy;
}
$ M = if ('{tm_test___Vita_raw}' <1) {$ spoints = 0;}
$ F = if ((int) round (('{tm_test_vita_raw}' / '{tm_test ___ Fianchi_raw}') * 100) / 100; <0.94) {$ spoints = 0;
If ((int) '{tm_test ___ sex_allen}' == Male) {$ spoints = $ dummy;}
else
If ((int) '{tm_test ___ sex_allen}' == Female) {$ spoints = $ f;}
else
$ Spoints = "ND";
Return $ spoints;