From 86cd5f760bd63798d94fec75a6b1c723ad6424c7 Mon Sep 17 00:00:00 2001 From: DevEnv nis2-agile Date: Mon, 9 Mar 2026 12:19:21 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]=20MktgLeadController=20+=20ContactControl?= =?UTF-8?q?ler:=20getRequestBody=20=E2=86=92=20getJsonBody?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Il metodo corretto in BaseController รจ getJsonBody(), non getRequestBody(). Co-Authored-By: Claude Sonnet 4.6 --- application/controllers/ContactController.php | 2 +- application/controllers/MktgLeadController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/ContactController.php b/application/controllers/ContactController.php index df7cbc0..1771d52 100644 --- a/application/controllers/ContactController.php +++ b/application/controllers/ContactController.php @@ -44,7 +44,7 @@ class ContactController extends BaseController file_put_contents($cacheFile, json_encode($data)); // Validazione input - $body = $this->getRequestBody(); + $body = $this->getJsonBody(); $nome = trim($body['nome'] ?? ''); $email = trim($body['email'] ?? ''); $azienda = trim($body['azienda'] ?? ''); diff --git a/application/controllers/MktgLeadController.php b/application/controllers/MktgLeadController.php index 42eb950..0fe2265 100644 --- a/application/controllers/MktgLeadController.php +++ b/application/controllers/MktgLeadController.php @@ -46,7 +46,7 @@ class MktgLeadController extends BaseController file_put_contents($cacheFile, json_encode($cache)); // Input - $body = $this->getRequestBody(); + $body = $this->getJsonBody(); // Supporta sia campi IT (form NIS2) che campi EN (standard mktg) $name = trim($body['name'] ?? $body['nome'] ?? '');