From 6ef0848b54c9330b2a1141d68a87f84376ccb23e Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 1 Jun 2022 07:53:50 +0000 Subject: [PATCH] wip #5229 @0.25 --- inc/ws/Controlleur/class.ws.services.php | 28 ++++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index fdc38ff89..9f5485b1e 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -1371,8 +1371,6 @@ class wsServices extends cubeFlashGateway public function yslSurvey() { - - global $core; $this->outputXML = false; @@ -1386,17 +1384,23 @@ class wsServices extends cubeFlashGateway $c->country = $_POST['country']; $c->function = $_POST['function']; $c->insert(); - $res = '1'; - $client = new Client(['timeout' => 10.0]); - $client->request('post', 'https://suivi.ysl-retailhandbook.com/importCSV.php', ['form_params' => [ - 'Fluidbook_ID' => $_POST['Fluidbook_ID'], - 'page' => $_POST['page'], - 'rating' => $_POST['rating'], - 'feedback' => $_POST['feedback'], - 'country' => $_POST['country'], - 'function' => $_POST['function'], - ]]); + try { + $client = new Client(['timeout' => 10.0]); + $client->request('post', 'https://suivi.ysl-retailhandbook.com/importCSV.php', ['form_params' => [ + 'Fluidbook_ID' => $_POST['Fluidbook_ID'], + 'page' => $_POST['page'], + 'rating' => $_POST['rating'], + 'feedback' => $_POST['feedback'], + 'country' => $_POST['country'], + 'function' => $_POST['function'], + 'title' => $_POST['title'], + ]]); + } catch (Exception $e1) { + + } + + $res = '1'; } catch (Exception $e) { $res = '0'; -- 2.39.5