From 3fe506499178b55a885fcf185ffee1c9de264d1d Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Sun, 19 May 2024 16:27:15 +0200 Subject: [PATCH] test --- app/CustomFuncPao.php | 4 ++++ routes/web.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index 4307aeab..ad6d7fbc 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -33,6 +33,8 @@ function updateValueByKey(&$array, $key, $newValue) { break; // Se trova il key, termina il loop } } + + $array[$key] = $newValue; } function updateValueByKeyArr(&$array, $key, $newValue) { @@ -42,4 +44,6 @@ function updateValueByKeyArr(&$array, $key, $newValue) { break; // Se trova il key, termina il loop } } + + $array[$key] = $newValue; } diff --git a/routes/web.php b/routes/web.php index 0d9274ad..38780258 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6113,8 +6113,8 @@ Route::get('/aggiornapreorder/{idarticolo}/{aggiornapreordine}', function ($idar $idprodotto = $product['parent_id']; if ($idprodotto > 0) { $data['meta_data'] = $product['meta_data']; - updateValueByKeyArr($data['meta_data'], $campoPreOrder, 'true'); - updateValueByKeyArr($data['meta_data'], '_is_pre_order', 'true'); + updateValueByKey($data['meta_data'], $campoPreOrder, 'true'); + updateValueByKey($data['meta_data'], '_is_pre_order', 'true'); echo "
Dati da Salvare:"; echo showarray($data);