* Generate a new request object
* Deprecated: @see HttpRequestFactory::create
* @param string $url Url to use
- * @param array $options (optional) extra params to pass (see Http::request())
+ * @param array|null $options (optional) extra params to pass (see Http::request())
* @param string $caller The method making this request, for profiling
* @throws DomainException
* @return MWHttpRequest
* @see MWHttpRequest::__construct
*/
- public static function factory( $url, array $options = [], $caller = __METHOD__ ) {
+ public static function factory( $url, array $options = null, $caller = __METHOD__ ) {
+ if ( $options === null ) {
+ $options = [];
+ }
return \MediaWiki\MediaWikiServices::getInstance()
->getHttpRequestFactory()
->create( $url, $options, $caller );