]> granicus.if.org Git - php/commitdiff
MFH: missing part of the fix for #38844
authorAntony Dovgal <tony2001@php.net>
Fri, 15 Sep 2006 15:42:53 +0000 (15:42 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 15 Sep 2006 15:42:53 +0000 (15:42 +0000)
ext/curl/config.m4
ext/curl/streams.c

index 00b410b357d0f20b0325c5040b05eb7c99cc4bd9..8fe2ee300ffd79779a289364bf3a1d93bd28a854 100644 (file)
@@ -108,6 +108,12 @@ if test "$PHP_CURL" != "no"; then
     $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
   ])
 
+  PHP_CHECK_LIBRARY(curl,curl_multi_strerror,
+  [
+    AC_DEFINE(HAVE_CURL_MULTI_STRERROR,1,[ ])
+  ],[],[
+    $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
+  ])
 
   if test "$PHP_CURLWRAPPERS" != "no" ; then
     AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
index c021d6eb0c3e8ddd66394a80de474093627401f9..4c16a2cf2f6ea0667771239f84b470e32df510ca 100644 (file)
@@ -434,7 +434,11 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
                }
 
                if (m != CURLM_OK) {
+#if HAVE_CURL_MULTI_STRERROR
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_multi_strerror(m));
+#else 
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", m);
+#endif
                        php_stream_close(stream);
                        return NULL;
                }