[packages/php/PHP_5_6] Rel 34; don't return anything in curl_error on success
arekm
arekm at pld-linux.org
Thu Oct 9 15:35:59 CEST 2025
commit 6e2488b9dbbf18b0a41f30b1e861992b7fd0f061
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 9 15:35:44 2025 +0200
Rel 34; don't return anything in curl_error on success
curl.patch | 20 +++++++++++++-------
php.spec | 2 +-
2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/php.spec b/php.spec
index 5410392..20070cf 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 33
+%define rel 34
%define orgname php
%define ver_suffix 56
%define php_suffix %{!?with_default_php:%{ver_suffix}}
diff --git a/curl.patch b/curl.patch
index 01775be..5698e41 100644
--- a/curl.patch
+++ b/curl.patch
@@ -1,14 +1,20 @@
---- 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)
+--- php-5.6.40/ext/curl/interface.c.org 2025-10-09 15:32:07.139978102 +0200
++++ php-5.6.40/ext/curl/interface.c 2025-10-09 15:34:42.704138342 +0200
+@@ -3212,8 +3212,16 @@ PHP_FUNCTION(curl_error)
+
ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
- ch->err.str[CURL_ERROR_SIZE] = 0;
+- 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);
++ if (ch->err.no) {
++ ch->err.str[CURL_ERROR_SIZE] = 0;
++ if (strlen(ch->err.str) > 0) {
++ RETURN_STRING(ch->err.str, 1);
++ } else {
++ RETURN_STRING(curl_easy_strerror(ch->err.no), 1);
++ }
+ } else {
-+ RETURN_STRING(curl_easy_strerror(ch->err.no), 1);
++ RETURN_EMPTY_STRING();
+ }
}
/* }}} */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/6e2488b9dbbf18b0a41f30b1e861992b7fd0f061
More information about the pld-cvs-commit
mailing list