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); } }