What could be causing an error like this:
Error: Undefined property: setup_self_ini::$nm_bases_access
in_array() expects parameter 2 to be array, null given
My code is something like this within onValidate of a control app:
try {
sc_begin_trans();
sc_exec_sql(“INSERT INTO sec_users …”);
sc_exec_sql("INSERT INTO staff ....");
// log an insert
$y = 'inserting';
sc_exec_sql("INSERT INTO sc_log .....");
sc_commit_trans();
} catch (Exception $e) {
sc_rollback_trans();
sc_error_message("Unexpected error: $e");
sc_error_exit();
}
}
When I remove the transaction statements, it all works ok. Or is it the case onValidate section already works like transaction?