As a test, I have this code on a PHP button on a grid app:
if (1==2)
{
sc_confirm(“First”);
}
else
{
echo “Second”;
}
When executed, the confirmation dialog is displayed but it never should because 1==2 is always false.
After pressing the OK button in the confirmation dialog, the text “Second” is displayed in the app and this is correct.
I tried other tests and it seems that when sc_confirm is anywhere in the code, it will always be executed regardless of the conditions.
Is this the expected behavior? Or is it a bug?