From 8dc9bb5bbc43216c0997b11f88f17f537b5e1244 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 20 Apr 2017 12:49:49 +0200 Subject: [PATCH] removes queries on the go so they don't get stuck on exceptions --- src/Runtime/ClientRequest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Runtime/ClientRequest.php b/src/Runtime/ClientRequest.php index 23778b68..1ddf5ab7 100644 --- a/src/Runtime/ClientRequest.php +++ b/src/Runtime/ClientRequest.php @@ -123,7 +123,7 @@ private function setMediaTypeHeaders(RequestOptions $request) public function executeQuery() { $serializer = new JsonPayloadSerializer($this->format); - foreach ($this->queries as $qry) { + while(($qry = array_shift($this->queries)) !== null) { $request = $this->buildRequest($qry); if (is_callable($this->eventsList["BeforeExecuteQuery"])) { call_user_func_array($this->eventsList["BeforeExecuteQuery"], array( @@ -151,7 +151,6 @@ public function executeQuery() } } } - $this->queries = array(); } /**