Hi,
My Submit event has this structure below:
The reportError doesn't work in this structure above.
But, if the reportError was called in the Main Code, it works.
Why?😲
My Submit event has this structure below:
//Send email by Joomla Mailer
function reportError(){
...
}
function insertUser(){
...
try{
...
} catch (Exception $e) {
reportError();
return false;
}
}
//Main code
if(!insertUser()){
$form->validation_errors['db_errors'] = "Erro!";
return false;
}
The reportError doesn't work in this structure above.
But, if the reportError was called in the Main Code, it works.
//Send email by Joomla Mailer
function reportError(){
...
}
function insertUser(){
...
try{
...
} catch (Exception $e) {
reportError();
return false;
}
}
//Main code
if(!insertUser()){
reportError();
$form->validation_errors['db_errors'] = "Erro!";
return false;
}
Why?😲