Skip to content

EspoCRM – Open Source CRM Application

Fix null curl resolve

Yuriibb03cb157e50
diff --git a/application/Espo/Core/HttpClient/Client.php b/application/Espo/Core/HttpClient/Client.php
index 77ba1f78e3..1b99f8ff55 100644
--- a/application/Espo/Core/HttpClient/Client.php
+++ b/application/Espo/Core/HttpClient/Client.php
@@ -161,8 +161,10 @@ class Client
throw new NotAllowedInternalHost("Not allowed internal host in '$url'.");
}
- $options['curl'] ??= [];
- $options['curl'][CURLOPT_RESOLVE] = $resolve;
+ if ($resolve) {
+ $options['curl'] ??= [];
+ $options['curl'][CURLOPT_RESOLVE] = $resolve;
+ }
return $handler($request, $options);
};