diff --git a/views/tpls/forms/cplx/suiviFromBudgetActions.php b/views/tpls/forms/cplx/suiviFromBudgetActions.php
index 9d1cb7ed8f4f8eb6c0182787624e54eeeb52f2b7..7b7b153dbd1a8cd078a7e15e21c2bf39c1e0461f 100644
--- a/views/tpls/forms/cplx/suiviFromBudgetActions.php
+++ b/views/tpls/forms/cplx/suiviFromBudgetActions.php
@@ -52,8 +52,10 @@ $actions = PHDB::find(Actions::COLLECTION, [
"parentType" => Form::ANSWER_COLLECTION] );
//clear any existing todos
-foreach ($answers as $ix => $a) {
- $answers[$ix]["todo"] = [];
+if(isset($answers)){
+ foreach ($answers as $ix => $a) {
+ $answers[$ix]["todo"] = [];
+ }
}
//reset todo with actions
foreach ($actions as $id => $a) {
@@ -74,11 +76,13 @@ foreach ($actions as $id => $a) {
}
}
//overload existing todo and add to answerObj
-foreach ($answers as $ix => $a) {
- if(empty($answers[$ix]["todo"]))
- unset($answers[$ix]["todo"]);
- else
- echo "";
+if(isset($answers)){
+ foreach ($answers as $ix => $a) {
+ if(empty($answers[$ix]["todo"]))
+ unset($answers[$ix]["todo"]);
+ else
+ echo "";
+ }
}
$editBtnL = "";