Skip to content

Commit c40975e

Browse files
committed
MFH: missing part of the fix for #38844
1 parent fcf4f87 commit c40975e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ext/curl/config.m4

+6
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ if test "$PHP_CURL" != "no"; then
108108
$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
109109
])
110110

111+
PHP_CHECK_LIBRARY(curl,curl_multi_strerror,
112+
[
113+
AC_DEFINE(HAVE_CURL_MULTI_STRERROR,1,[ ])
114+
],[],[
115+
$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
116+
])
111117

112118
if test "$PHP_CURLWRAPPERS" != "no" ; then
113119
AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])

ext/curl/streams.c

+4
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,11 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
434434
}
435435

436436
if (m != CURLM_OK) {
437+
#if HAVE_CURL_MULTI_STRERROR
437438
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_multi_strerror(m));
439+
#else
440+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", m);
441+
#endif
438442
php_stream_close(stream);
439443
return NULL;
440444
}

0 commit comments

Comments
 (0)