From c66f00cc335686298620f58c154a3b3bc4faa092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 30 Mar 2022 16:50:26 +0200 Subject: [PATCH] Response.php : validate json check should check if really false --- changelog.md | 3 ++- src/Transport/Response.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 5179f47..5fa3bde 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,8 @@ ### All notable changes to `CRM CLient V2` will be documented in this file. -Fixed : request merge method of data to query (Request.php) +- Fixed : request merge method of data to query (Request.php) +- Fixed : validate json check should check if really false (Response.php) # version 3.0.2 - Regen documentation with php documentor diff --git a/src/Transport/Response.php b/src/Transport/Response.php index 5eab32b..613b6dd 100644 --- a/src/Transport/Response.php +++ b/src/Transport/Response.php @@ -95,7 +95,7 @@ class Response } // * Body should be json data. - if (!($decodedJson = $this->tryDecodeJson($this->body->getContents()))) { + if (($decodedJson = $this->tryDecodeJson($this->body->getContents())) === false) { if (Utils::getConfig('app.env') === 'testing') { dump((string)$this->body); }