From 5e78c10858204d9e4a53a0faed4b6c247bcaae56 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 13 Nov 2023 16:28:22 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20variables=20oubli=C3=A9es=20dans=20runI?= =?UTF-8?q?f=20...=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/modifier_materiel.php | 2 +- src/admin/mouvements/sorties/stock_disponible.php | 2 +- src/admin/mouvements/sorties/supprimer_sortie.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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);