Skip to content
Snippets Groups Projects
Commit 83f9d23d authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #73233 : catch possible exceptions, allow element and displayGroup removal

parent a615a3e5
Branches
Tags
3 merge requests!2660Master,!2655Dev#73233 planif contractuel minsoc formulaire gerer le rendu cote front,!2637Dev#73233 planif contractuel minsoc formulaire gerer le rendu cote front
Pipeline #4085 passed with stage
in 33 minutes and 17 seconds
......@@ -130,7 +130,18 @@ class Class_SearchFormWrapper {
$includer = Class_SearchForm::getIncluder();
$form = new ZendAfi_Form_AdvancedSearch();
$includer($file->getRealpath(), $form);
$runtime_error = '';
try {
$includer($file->getRealpath(), $form);
} catch(Exception $e) {
$runtime_error = $e->getMessage();
}
if ($runtime_error)
return $this->addError($this->_('Le fichier lié à ce formulaire a provoqué une erreur d\'exécution : %s',
$runtime_error));
return $this->setForm($form);
}
......
......@@ -110,7 +110,10 @@ class Class_SearchForm_ValidatorMethodCalls extends NodeVisitorAbstract {
'addElement',
'addDisplayGroup',
'addUniqDisplayGroup',
'removeElement',
'removeDisplayGroup',
'_',
// storm
'find',
'findAll',
......@@ -127,6 +130,7 @@ class Class_SearchForm_ValidatorMethodCalls extends NodeVisitorAbstract {
'getArrayCopy',
'getListeTris',
'getMultiOptions',
// php
'count']
;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment