Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eshangupta-plivo committed Nov 8, 2024
1 parent a9cf3cd commit 7be9e1d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Plivo/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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']);
Expand All @@ -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;
Expand Down Expand Up @@ -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']);
Expand Down

0 comments on commit 7be9e1d

Please sign in to comment.