Page MenuHomePhabricator

InvalidArgumentException in CurlHttpRequest.php with ForeignAPIRepo
Open, Needs TriagePublic

Description

I meet an exception to upload image(s) or open file(s) page in my wiki.

InvalidArgumentException from line 102 of /path/to/mediawiki/includes/http/CurlHttpRequest.php: Error setting curl options.

My server and softwares (ISP Sakura Internet in Japan)
MediaWiki 1.32.0 or 1.32.1
PHP 7.2.17 (apache2handler)
MySQL 5.5.59-log
ICU 63.1
OS FreeBSD 11.2

% uname -a
FreeBSD www302.sakura.ne.jp 11.2-RELEASE-p9 FreeBSD 11.2-RELEASE-p9 #0: Tue Feb 5 15:30:36 UTC 2019 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

I surveyed and found it.
It is caused by call curl_setopt_array() with CURLOPT_PROXY and empty value.

I make patch attached.

description (in Japanese)
https://kimagurenote.net/kn/MediaWiki#CurlHttpRequest_%E3%81%AE%E4%B8%8D%E5%85%B7%E5%90%88%E4%BF%AE%E6%AD%A3

Thank you for your attention and sorry about my broken English.

Event Timeline

Hi @cory, thanks for taking the time to report this and for taking a look at the code!

You are very welcome to use developer access to submit the proposed code changes as a Git branch directly into Gerrit which makes it easier to review them quickly and provide feedback.
If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks again!

Looking into the future, this might not be needed anymore once someone fixes T137926: Support running MediaWiki without 'curl' PHP extension