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

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


commit 59fea5d9234fc434176b7ed7e8fe93bd5965232e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Jul 18 09:52:30 2024 +0200

    Improve curl errors a bit.

 curl.patch | 15 +++++++++++++++
 php.spec   |  4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/php.spec b/php.spec
index 54a7a87..e95f91b 100644
--- a/php.spec
+++ b/php.spec
@@ -155,7 +155,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine	with_filter
 %endif
 
-%define		rel	27
+%define		rel	28
 %define		orgname	php
 %define		ver_suffix 56
 %define		php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -205,6 +205,7 @@ Patch16:	mysql-auth.patch
 Patch17:	%{orgname}-readline.patch
 Patch18:	%{orgname}-nohttpd.patch
 Patch19:	%{orgname}-ac.patch
+Patch20:	curl.patch
 Patch21:	%{orgname}-dba-link.patch
 Patch22:	%{orgname}-both-apxs.patch
 Patch23:	%{orgname}-builddir.patch
@@ -2119,6 +2120,7 @@ cp -p php.ini-production php.ini
 %patch17 -p1
 %patch18 -p1
 %patch19 -p1
+%patch20 -p1
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
diff --git a/curl.patch b/curl.patch
new file mode 100644
index 0000000..01775be
--- /dev/null
+++ b/curl.patch
@@ -0,0 +1,15 @@
+--- php-5.6.40/ext/curl/interface.c~	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/curl/interface.c	2024-07-18 09:44:35.079870385 +0200
+@@ -3213,7 +3213,11 @@ PHP_FUNCTION(curl_error)
+ 	ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
+ 
+ 	ch->err.str[CURL_ERROR_SIZE] = 0;
+-	RETURN_STRING(ch->err.str, 1);
++	if (strlen(ch->err.str) > 0) {
++		RETURN_STRING(ch->err.str, 1);
++	} else {
++		RETURN_STRING(curl_easy_strerror(ch->err.no), 1);
++	}
+ }
+ /* }}} */
+ 
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list