From f3091b4af8d819c8180f07e1d25bcad0b1f9c586 Mon Sep 17 00:00:00 2001 From: eshangupta-plivo Date: Fri, 8 Nov 2024 13:00:11 +0530 Subject: [PATCH 1/4] SMS-7151 --- src/Plivo/BaseClient.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Plivo/BaseClient.php b/src/Plivo/BaseClient.php index 97044432..e75e3b0a 100644 --- a/src/Plivo/BaseClient.php +++ b/src/Plivo/BaseClient.php @@ -228,6 +228,9 @@ public function fetch($uri, $params) static::$isLookupRequest = true; unset($params['isLookupRequest']); } + else{ + static::$isLookupRequest = false; + } if (array_key_exists("isZentrunkRequest",$params)) { static::$isZentrunkRequest = true; unset($params['isZentrunkRequest']); @@ -247,6 +250,7 @@ public function fetch($uri, $params) public function update($uri, $params) { $url = NULL; + static::$isLookupRequest = false; // Safe to set false as lookup never uses POST $isCallInsightsRequest = FALSE; if (array_key_exists("isCallInsightsRequest", $params)) { $isCallInsightsRequest = TRUE; @@ -319,6 +323,7 @@ public function getPhlorunner($uri, $params) */ public function delete($uri, $params) { + static::$isLookupRequest = false; // Safe to set false as lookup never uses DELETE if (array_key_exists("isVoiceRequest", $params)) { static::$isVoiceRequest = true; unset($params['isVoiceRequest']); From a9cf3cd271275b86ea8bc6629ab02ad69447b12f Mon Sep 17 00:00:00 2001 From: eshangupta-plivo Date: Fri, 8 Nov 2024 13:42:25 +0530 Subject: [PATCH 2/4] Changed log updated --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47473394..86d6b69c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.66.3](https://github.com/plivo/plivo-php/tree/v4.66.3) (2024-11-08) +**Bug fix** +-Fix subsquent requests to other services after a lookup request + ## [4.66.2](https://github.com/plivo/plivo-php/tree/v4.66.2) (2024-10-23) **Feature - FraudCheck param in Create, Get and List Session** - Support for the `fraud_check` parameter in sms verify session request From 7be9e1df15227b01cd6a617e3e717f0f3980a3a6 Mon Sep 17 00:00:00 2001 From: eshangupta-plivo Date: Fri, 8 Nov 2024 15:44:14 +0530 Subject: [PATCH 3/4] fix --- src/Plivo/BaseClient.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Plivo/BaseClient.php b/src/Plivo/BaseClient.php index e75e3b0a..6880154d 100644 --- a/src/Plivo/BaseClient.php +++ b/src/Plivo/BaseClient.php @@ -194,6 +194,8 @@ public function sendRequest(PlivoRequest $request, $url = null) static::$requestCount++; + static::$isLookupRequest = false; + static::$isZentrunkRequest = false; if (!$plivoResponse->ok() && !static::$isVoiceRequest) { return $plivoResponse; } @@ -228,9 +230,6 @@ public function fetch($uri, $params) static::$isLookupRequest = true; unset($params['isLookupRequest']); } - else{ - static::$isLookupRequest = false; - } if (array_key_exists("isZentrunkRequest",$params)) { static::$isZentrunkRequest = true; unset($params['isZentrunkRequest']); @@ -250,7 +249,6 @@ public function fetch($uri, $params) public function update($uri, $params) { $url = NULL; - static::$isLookupRequest = false; // Safe to set false as lookup never uses POST $isCallInsightsRequest = FALSE; if (array_key_exists("isCallInsightsRequest", $params)) { $isCallInsightsRequest = TRUE; @@ -323,7 +321,6 @@ public function getPhlorunner($uri, $params) */ public function delete($uri, $params) { - static::$isLookupRequest = false; // Safe to set false as lookup never uses DELETE if (array_key_exists("isVoiceRequest", $params)) { static::$isVoiceRequest = true; unset($params['isVoiceRequest']); From 903246a8a4d15831469b53bff9004bd5fa16816f Mon Sep 17 00:00:00 2001 From: eshangupta-plivo Date: Mon, 11 Nov 2024 11:01:37 +0530 Subject: [PATCH 4/4] version change --- src/Plivo/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plivo/Version.php b/src/Plivo/Version.php index a70fc6e9..cb751ddd 100644 --- a/src/Plivo/Version.php +++ b/src/Plivo/Version.php @@ -26,7 +26,7 @@ class Version * @const int PHP helper library patch number */ - const PATCH = 2; + const PATCH = 3; /** * @return string