From d05517f4a3b0e8ce2ac1e8a0c590364a72a42757 Mon Sep 17 00:00:00 2001 From: "Erik Trapin (ecoologic)" Date: Mon, 20 May 2024 12:12:27 +1000 Subject: [PATCH] Debug headers as JSON Fix #465 --- src/Zendesk/API/Debug.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Zendesk/API/Debug.php b/src/Zendesk/API/Debug.php index fb87c753..eba48c22 100755 --- a/src/Zendesk/API/Debug.php +++ b/src/Zendesk/API/Debug.php @@ -20,7 +20,7 @@ class Debug */ public $lastResponseCode; /** - * @var string + * @var mixed */ public $lastResponseHeaders; /** @@ -39,8 +39,8 @@ public function __toString() } $output = 'LastResponseCode: ' . $this->lastResponseCode . ', LastResponseError: ' . $lastError - . ', LastResponseHeaders: ' . $this->lastResponseHeaders - . ', LastRequestHeaders: ' . $this->lastRequestHeaders + . ', LastResponseHeaders: ' . json_encode($this->lastResponseHeaders) + . ', LastRequestHeaders: ' . json_encode($this->lastRequestHeaders) . ', LastRequestBody: ' . $this->lastRequestBody; return $output;