From f566d039abd627aa1245133c35b8551796f75439 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sat, 17 Sep 2022 21:19:57 +0100 Subject: [PATCH] Added json_encode --- report-issue/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/report-issue/index.php b/report-issue/index.php index b7b6a17..3a73909 100644 --- a/report-issue/index.php +++ b/report-issue/index.php @@ -39,12 +39,14 @@ ); // Prepare the request - $issueData = array( + $rawData = array( 'body' => $detail, 'title' => $subject, 'closed' => 'false' ); + $issueData = json_encode($rawData); + // Prepare CURL $curlConnection = curl_init('https://git.fjla.uk/api/v1/repos/fred.boniface/athena.fb-infra.uk/issues'); curl_setopt($curlConnection, CURLOPT_POSTFIELDS, $issueData);