* fix URL standardization (follow-up to I675f8252a2)
* avoid warning when timeout is not provided
Change-Id: I2a6c099f52f78017f92de4c078e79de04f230dda
'url' => 'http://localhost:8000/',
'prefix' => 'localhost',
'domain' => 'localhost',
'url' => 'http://localhost:8000/',
'prefix' => 'localhost',
'domain' => 'localhost',
'forwardCookies' => false,
'HTTPProxy' => null,
], $params );
// Ensure that the url parameter has a trailing slash.
'forwardCookies' => false,
'HTTPProxy' => null,
], $params );
// Ensure that the url parameter has a trailing slash.
- $mparams['url'] = preg_replace(
- '#/?$#',
- '/',
- $mparams['url']
- );
+ if ( substr( $mparams['url'], -1 ) !== '/' ) {
+ $mparams['url'] .= '/';
+ }
// Ensure the correct domain format: strip protocol, port,
// and trailing slash if present. This lets us use
// $wgCanonicalServer as a default value, which is very convenient.
// Ensure the correct domain format: strip protocol, port,
// and trailing slash if present. This lets us use
// $wgCanonicalServer as a default value, which is very convenient.