commit e7f932ae2eefe2534df9c84ec187b59f376ab50a Author: Arkadiusz Miśkiewicz <ar...@maven.pl> Date: Fri Jul 19 11:20:01 2024 +0200
Improve curl errors a bit. curl.patch | 27 +++++++++++++++++++++++++++ php.spec | 5 +++-- 2 files changed, 30 insertions(+), 2 deletions(-) --- diff --git a/php.spec b/php.spec index 90dc8fc..6ee4a63 100644 --- a/php.spec +++ b/php.spec @@ -148,7 +148,7 @@ Summary(ru.UTF-8): PHP - язык препроцессирования HTML-фа Summary(uk.UTF-8): PHP - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} Version: 8.0.28 -Release: 5 +Release: 6 Epoch: 4 # All files licensed under PHP version 3.01, except # Zend is licensed under Zend @@ -174,6 +174,7 @@ Patch2: %{orgname}-mail.patch Patch3: %{orgname}-link-libs.patch Patch4: intl-stdc++.patch Patch5: opcache-nokill-perm.patch +Patch6: curl.patch Patch7: %{orgname}-sapi-ini-file.patch Patch9: libtool-tag.patch Patch10: %{orgname}-ini.patch @@ -1871,7 +1872,7 @@ cp -p php.ini-production php.ini %patch3 -p1 %patch4 -p1 %patch5 -p1 - +%patch6 -p1 %patch7 -p1 -b .sapi-ini-file %patch9 -p1 %patch10 -p1 -b .ini 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 <devne...@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/e7f932ae2eefe2534df9c84ec187b59f376ab50a _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit