From da9f11ffb3a01c5f8a477dd3992e070c3840e416 Mon Sep 17 00:00:00 2001 From: Tycho van Berge Henegouwen Date: Wed, 17 Oct 2018 15:53:43 -0300 Subject: [PATCH] Check for headers --- endpoint.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/endpoint.php b/endpoint.php index a2b4fca..acb228b 100644 --- a/endpoint.php +++ b/endpoint.php @@ -106,11 +106,9 @@ function signRequest() { $contentAsObject = json_decode($responseBody, true); $jsonContent = json_encode($contentAsObject); - $headersStr = $contentAsObject["headers"]; - if ($headersStr) { - signRestRequest($headersStr); - } - else { + if (isset($contentAsObject["headers"])) { + signRestRequest($contentAsObject["headers"]); + } else { signPolicy($jsonContent); } }