Requested by a user at https://www.mediawiki.org/wiki/Topic:Vkk1ahk3eggd9747 for
whom their hoster provides curl but with multi-threaded functions removed for
some reason.
Change-Id: Id3877c600ae02feffb67f74a815430f8e679230a
(cherry picked from commit
1c241419914d1203ea90eeea6a41d76f4a2ecbec)
THIS IS NOT A RELEASE YET
=== Changes since MediaWiki 1.34.1 ===
+* The MultiHttpClient code will fallover to non-curl if curl_multi* is blocked.
== MediaWiki 1.34.1 ==
* @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' );
}
/**