From f55e0b2cb080a59f9d794285dfa0abbce681a357 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Fri, 29 Jun 2018 12:36:52 +0300 Subject: [PATCH] Minor bug fixes --- application/Espo/Services/AdminNotifications.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/Espo/Services/AdminNotifications.php b/application/Espo/Services/AdminNotifications.php index b8035dbae2..baefb9b2ff 100644 --- a/application/Espo/Services/AdminNotifications.php +++ b/application/Espo/Services/AdminNotifications.php @@ -165,9 +165,10 @@ class AdminNotifications extends \Espo\Core\Services\Base if (function_exists('curl_version')) { $ch = curl_init(); - $requestUrl = $url ? $url : base64_decode('aHR0cHM6Ly9zLmVzcG9jcm0uY29tLw=='); + $requestUrl = $url ? trim($url) : base64_decode('aHR0cHM6Ly9zLmVzcG9jcm0uY29tLw=='); + $requestUrl = (substr($requestUrl, -1) == '/') ? $requestUrl : $requestUrl . '/'; - curl_setopt($ch, CURLOPT_URL, $requestUrl. '?' . http_build_query($requestData)); + curl_setopt($ch, CURLOPT_URL, $requestUrl . '?' . http_build_query($requestData)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);