MultiHttpClient: Also fallover to non-curl if curl_multi* is blocked
[lhc/web/wiklou.git] / includes / libs / http / MultiHttpClient.php
index b0c8a8b..85959d6 100644 (file)
@@ -176,7 +176,9 @@ class MultiHttpClient implements LoggerAwareInterface {
         * @return bool true if curl is available, false otherwise.
         */
        protected function isCurlEnabled() {
-               return extension_loaded( 'curl' );
+               // Explicitly test if curl_multi* is blocked, as some users' hosts provide
+               // them with a modified curl with the multi-threaded parts removed(!)
+               return extension_loaded( 'curl' ) && function_exists( 'curl_multi_init' );
        }
 
        /**