This started happening after Era was restarted earlier today.
PHP Code:
function onCreated() {
temp.key = "abc";
switch (temp.key) {
case "foo":
echo("key=foo");
return; // this line is problematic
break;
case "abc":
echo("key=abc");
break;
}
}
If you run the following code, nothing will echo. If you comment out the return statement, then it will echo "key=abc" as expected.
It appears that a return statement in a switch causes everything below it to be ignored, even if that case shouldn't have been executed. This is new functionality which is breaking a few things on Era. It did not happen before the server restart today.
This bug also appears to exist clientside on both v5 and v6.