Page MenuHomePhabricator

InvalidArgumentException in CurlHttpRequest.php with ForeignAPIRepo
Open, Needs TriagePublic


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 11.2-RELEASE-p9 FreeBSD 11.2-RELEASE-p9 #0: Tue Feb 5 15:30:36 UTC 2019 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)

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

Event Timeline

cory created this task.May 20 2019, 2:40 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 20 2019, 2:40 PM

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