[packages/php/PHP_7_2] Improve curl errors a bit.

arekm arekm at pld-linux.org
Thu Jul 18 11:18:03 CEST 2024


commit cce79a717ccb25dcebb2da9dd0d372a73ea783bc
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Jul 18 10:12:26 2024 +0200

    Improve curl errors a bit.

 curl.patch | 27 +++++++++++++++++++++++++++
 php.spec   |  7 ++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
---
diff --git a/php.spec b/php.spec
index e27bce5..df4eeb4 100644
--- a/php.spec
+++ b/php.spec
@@ -155,7 +155,7 @@ Summary(ru.UTF-8):	PHP Версии 7 - язык препроцессирова
 Summary(uk.UTF-8):	PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:		%{orgname}%{php_suffix}
 Version:	7.2.34
-Release:	14
+Release:	15
 Epoch:		4
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
@@ -186,6 +186,8 @@ Patch8:		milter.patch
 Patch9:		libtool-tag.patch
 Patch10:	%{orgname}-ini.patch
 Patch11:	embed.patch
+Patch12:	curl.patch
+
 Patch14:	%{orgname}-no_pear_install.patch
 Patch17:	%{orgname}-readline.patch
 Patch18:	%{orgname}-nohttpd.patch
@@ -2010,6 +2012,9 @@ cp -p php.ini-production php.ini
 %{?with_milter:%patch8 -p1}
 %patch9 -p1
 %patch10 -p1
+
+%patch12 -p1
+
 %patch14 -p1
 %patch17 -p1
 %patch18 -p1
diff --git a/curl.patch b/curl.patch
new file mode 100644
index 0000000..5261f3a
--- /dev/null
+++ b/curl.patch
@@ -0,0 +1,27 @@
+commit efd00b8ff05cb78ecb0351b96cce7780bcb72a2a
+Author: David Carlier <devnexen at gmail.com>
+Date:   Tue Jul 16 19:55:04 2024 +0100
+
+    ext/curl: curl_error using curl_easy_strerror if CURLOPT_ERRORBUFFER
+    
+    did not fill the error buffer.
+    
+    close GH-14984
+
+diff --git a/ext/curl/interface.c b/ext/curl/interface.c
+index 707f4e0a6f..4884ddc822 100644
+--- a/ext/curl/interface.c
++++ b/ext/curl/interface.c
+@@ -2764,7 +2764,11 @@ PHP_FUNCTION(curl_error)
+ 
+ 	if (ch->err.no) {
+ 		ch->err.str[CURL_ERROR_SIZE] = 0;
+-		RETURN_STRING(ch->err.str);
++		if (strlen(ch->err.str) > 0) {
++			RETURN_STRING(ch->err.str);
++		} else {
++			RETURN_STRING(curl_easy_strerror(ch->err.no));
++		}
+ 	} else {
+ 		RETURN_EMPTY_STRING();
+ 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/cce79a717ccb25dcebb2da9dd0d372a73ea783bc



More information about the pld-cvs-commit mailing list