* @param string $url
* @param array $options
* @param string $caller The method making this request, for profiling
- * @return string
+ * @return string|bool false on error
*/
public static function get( $url, $options = array(), $caller = __METHOD__ ) {
$args = func_get_args();
* @param string $url
* @param array $options
* @param string $caller The method making this request, for profiling
- * @return string
+ * @return string|bool false on error
*/
public static function post( $url, $options = array(), $caller = __METHOD__ ) {
return Http::request( 'POST', $url, $options, $caller );
* @return bool
*/
public static function isLocalURL( $url ) {
- global $wgCommandLineMode, $wgLocalVirtualHosts, $wgConf;
+ global $wgCommandLineMode, $wgLocalVirtualHosts;
if ( $wgCommandLineMode ) {
return false;
$domain = $domainPart . '.' . $domain;
}
- if ( in_array( $domain, $wgLocalVirtualHosts )
- || $wgConf->isLocalVHost( $domain )
- ) {
+ if ( in_array( $domain, $wgLocalVirtualHosts ) ) {
return true;
}
}
MediaWiki\suppressWarnings();
if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
wfDebug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " .
- "Probably safe_mode or open_basedir is set.\n" );
+ "Probably open_basedir is set.\n" );
// Continue the processing. If it were in curl_setopt_array,
// processing would have halted on its entry
}
}
if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
- if ( strval( ini_get( 'open_basedir' ) ) !== '' || wfIniGetBool( 'safe_mode' ) ) {
- wfDebug( "Cannot follow redirects in safe mode\n" );
+ if ( strval( ini_get( 'open_basedir' ) ) !== '' ) {
+ wfDebug( "Cannot follow redirects when open_basedir is set\n" );
return false;
}
}