From c8d9e2572c9fe4cd017e1bf6398e4d803ac430a0 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 13 Mar 2024 21:10:47 +0100 Subject: [PATCH] Narrow validation of curl_exec() --- Trustly/Api/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trustly/Api/api.php b/Trustly/Api/api.php index c9fee7d..e3336ff 100644 --- a/Trustly/Api/api.php +++ b/Trustly/Api/api.php @@ -313,7 +313,7 @@ public function post($url=NULL, $postdata=NULL) { curl_setopt($curl, CURLOPT_URL, $url); $body = curl_exec($curl); - if($body === FALSE) { + if(!is_string($body)) { $error = curl_error($curl); if($error === NULL) { $error = 'Failed to connect to the Trusly API';