Ajout variables oubliées dans runIf ... function

This commit is contained in:
Jean-Christophe Engel 2023-11-13 16:28:22 +01:00
parent b22ace0eb3
commit 5e78c10858
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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');

View File

@ -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);