aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2019-03-15 03:46:27 +0200
committerAndy Postnikov <apostnikov@gmail.com>2019-03-15 23:44:48 +0200
commitad2c2ff68b458ae2517627738e5c8f6c3c7d5ce2 (patch)
tree2d919fd26d9d296c9140372def422f64b5ddecc8 /community
parentfebe916014afb89ef15bd6a8e87397b06468b5d2 (diff)
downloadaports-ad2c2ff68b458ae2517627738e5c8f6c3c7d5ce2.tar.bz2
aports-ad2c2ff68b458ae2517627738e5c8f6c3c7d5ce2.tar.xz
community/php7: add patch for curl
Diffstat (limited to 'community')
-rw-r--r--community/php7/5025eb05bde83a0a51eb0668c45c240b366545bf.patch37
-rw-r--r--community/php7/APKBUILD6
2 files changed, 41 insertions, 2 deletions
diff --git a/community/php7/5025eb05bde83a0a51eb0668c45c240b366545bf.patch b/community/php7/5025eb05bde83a0a51eb0668c45c240b366545bf.patch
new file mode 100644
index 0000000000..b95677c12e
--- /dev/null
+++ b/community/php7/5025eb05bde83a0a51eb0668c45c240b366545bf.patch
@@ -0,0 +1,37 @@
+From 5025eb05bde83a0a51eb0668c45c240b366545bf Mon Sep 17 00:00:00 2001
+From: Jay Satiro <raysatiro@yahoo.com>
+Date: Fri, 1 Mar 2019 01:37:00 -0500
+Subject: [PATCH] curl_error: return an empty string if no error occurred
+
+CURLOPT_ERRORBUFFER doc says "Do not rely on the contents of the
+buffer unless an error code was returned." [1]
+
+Prior to this change the error buffer was returned even if no error had
+occurred, and that buffer may contain incorrect information in such a
+case. [2]
+
+[1]: https://curl.haxx.se/libcurl/c/CURLOPT_ERRORBUFFER.html
+[2]: https://github.com/curl/curl/issues/3629
+---
+ ext/curl/interface.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ext/curl/interface.c b/ext/curl/interface.c
+index 3af7ec12e23c..a252bb3a219d 100644
+--- a/ext/curl/interface.c
++++ b/ext/curl/interface.c
+@@ -3310,8 +3310,12 @@ PHP_FUNCTION(curl_error)
+ RETURN_FALSE;
+ }
+
+- ch->err.str[CURL_ERROR_SIZE] = 0;
+- RETURN_STRING(ch->err.str);
++ if (ch->err.no) {
++ ch->err.str[CURL_ERROR_SIZE] = 0;
++ RETURN_STRING(ch->err.str);
++ } else {
++ RETURN_EMPTY_STRING();
++ }
+ }
+ /* }}} */
+
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
index c0aeaa2907..dab58b909b 100644
--- a/community/php7/APKBUILD
+++ b/community/php7/APKBUILD
@@ -26,7 +26,7 @@
pkgname=php7
_pkgreal=php
pkgver=7.2.16
-pkgrel=0
+pkgrel=1
_apiver=20170718
_suffix=${pkgname#php}
# Is this package the default (latest) PHP version?
@@ -100,6 +100,7 @@ source="https://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
php7-fpm-version-suffix.patch
allow-build-recode-and-imap-together.patch
fix-tests-devserver.patch
+ 5025eb05bde83a0a51eb0668c45c240b366545bf.patch
"
builddir="$srcdir/$_pkgreal-$pkgver"
@@ -656,4 +657,5 @@ f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c93976
db4c47cb254d208e4055db9287f4f4bacc0339f1f5912d2bf9c66e8a0fd0db9d53fb02aaa6d30a823a4b8504a04a9ce906706f3792684654131bb5b26aeb77b2 sharedir.patch
6d4aa75b94ce7c88f97574a06964fafd7cb6657c1cb19c0b93776dedef05857331cce9c40f69a442ef84c66aa9137ad9f6197cc25f2384a27b8fd7350838292e php7-fpm-version-suffix.patch
f8ecae241a90cbc3e98aa4deb3d5d35ef555f51380e29f4e182a8060dffeb84be74f030a14c6b452668471030d78964f52795ca74275db05543ccad20ef1f2cc allow-build-recode-and-imap-together.patch
-5bb1f90de8c543d4efffa8bc604fb3239e478d9d9625d30cd03449643906a0fe5407123403206ec57f4bf9f18893a7ff4524ccf417b2bd8bce4ee7d18815b576 fix-tests-devserver.patch"
+5bb1f90de8c543d4efffa8bc604fb3239e478d9d9625d30cd03449643906a0fe5407123403206ec57f4bf9f18893a7ff4524ccf417b2bd8bce4ee7d18815b576 fix-tests-devserver.patch
+36fa7471d847d7044202fb2b8dfd137769eb3a69562cb021e22f42923fde830518468ee68dc64593278794732295f0ac58f2b0c66a5f64dcfbeded5bf5cbd635 5025eb05bde83a0a51eb0668c45c240b366545bf.patch"