From 360cd5452d84f9517fe04e7dbf649d533e5f0ff7 Mon Sep 17 00:00:00 2001 From: Oleg Balykin Date: Fri, 19 Mar 2021 17:29:37 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA=20=D0=BE?= =?UTF-8?q?=D1=82=20curl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Delivery/NovaPoshtaApi2.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Delivery/NovaPoshtaApi2.php b/src/Delivery/NovaPoshtaApi2.php index 042b17d..40b770d 100644 --- a/src/Delivery/NovaPoshtaApi2.php +++ b/src/Delivery/NovaPoshtaApi2.php @@ -289,6 +289,15 @@ private function request($model, $method, $params = null) } $result = curl_exec($ch); + + if (curl_errno($ch)) { + $e = new \Exception(curl_error($ch), curl_errno($ch)); + + curl_close($ch); + + throw $e; + } + curl_close($ch); } } else {