diff --git a/src/admin/modifier_materiel.php b/src/admin/modifier_materiel.php index 28f3428..c1e7f9a 100644 --- a/src/admin/modifier_materiel.php +++ b/src/admin/modifier_materiel.php @@ -27,7 +27,7 @@ $selected_cat = $eqmt_requested->category_id; $csrf_key = 'edit_equipment_' . $eqmt_requested->id; $form->runIf (f('save') && !$form->hasErrors(), - function () use ($eqmt, $eqmt_requested) + function () use ($eqmt, $eqmt_requested, $form) { // try to edit equipment selected and if error catched add it in form try diff --git a/src/admin/mouvements/sorties/stock_disponible.php b/src/admin/mouvements/sorties/stock_disponible.php index b47d934..adf685a 100644 --- a/src/admin/mouvements/sorties/stock_disponible.php +++ b/src/admin/mouvements/sorties/stock_disponible.php @@ -23,7 +23,7 @@ $selected_kind = $kinds[0]; $csrf_key = 'add_output'; $form->runIf(f('save') && !$form->hasErrors(), - function() use ($mvt, $eqmt) + function() use ($mvt, $eqmt, $form) { $eqmt_id = f('equipment_id'); $eqmt_number = (int) f('equipment_number'); diff --git a/src/admin/mouvements/sorties/supprimer_sortie.php b/src/admin/mouvements/sorties/supprimer_sortie.php index 244d4d4..0c36f62 100644 --- a/src/admin/mouvements/sorties/supprimer_sortie.php +++ b/src/admin/mouvements/sorties/supprimer_sortie.php @@ -20,7 +20,7 @@ if (!$output_to_delete) $csrf_key = 'delete_output_' . $output_to_delete->id; $form->runIf (f('delete') && !$form->hasErrors(), - function () use ($mvt) + function () use ($mvt, $output_to_delete) { // delete the movement required $mvt->delete($output_to_delete->id);