From ec27124e24fbc0dff7f0440ca49d87a9c32dc6a7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Jan 2026 18:08:48 +0100 Subject: [PATCH] Log message --- htdocs/core/lib/geturl.lib.php | 1 + test/phpunit/SecurityTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index e106c564aac..127e46e4fe3 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -355,6 +355,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $rep['curl_error_msg'] = curl_error($ch); dol_syslog("getURLContent response array is ".implode(',', $rep)); + if (getDolGlobalInt('MAIN_CURL_DEBUG')) { dol_syslog("getURLContent curl_error_no=".$rep['curl_error_no']." curl_error_msg=".$rep['curl_error_msg'], LOG_DEBUG, 0, '_curl'); } diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index fc719e8f1c1..6be33910476 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -472,7 +472,7 @@ class SecurityTest extends CommonClassTest $url = 'https://www.dolibarr.fr'; // This is a redirect 301 page $tmp = getURLContent($url, 'GET', '', 0); // We do NOT follow print __METHOD__." url=".$url."\n"; - $this->assertEquals(301, (empty($tmp['http_code']) ? 0 : $tmp['http_code']), 'Should GET url 301 response'); + $this->assertEquals(301, (empty($tmp['http_code']) ? 0 : $tmp['http_code']), 'Test getURLContent '.$url.' - Should GET url 301 response'); $url = 'https://www.dolibarr.fr'; // This is a redirect 301 page $tmp = getURLContent($url); // We DO follow a page with return 300 so result should be 200