Take port into consideration when spawning cron. Props bchecketts. fixes #4782
git-svn-id: http://svn.automattic.com/wordpress/trunk@5972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad90a8f560
commit
6a0629e717
|
@ -87,12 +87,14 @@ function spawn_cron() {
|
||||||
if ($parts['scheme'] == 'https') {
|
if ($parts['scheme'] == 'https') {
|
||||||
// support for SSL was added in 4.3.0
|
// support for SSL was added in 4.3.0
|
||||||
if (version_compare(phpversion(), '4.3.0', '>=') && function_exists('openssl_open')) {
|
if (version_compare(phpversion(), '4.3.0', '>=') && function_exists('openssl_open')) {
|
||||||
$argyle = @fsockopen('ssl://' . $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01);
|
$port = isset($parts['port']) ? $parts['port'] : 443;
|
||||||
|
$argyle = @fsockopen('ssl://' . $parts['host'], $port, $errno, $errstr, 0.01);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 );
|
$port = isset($parts['port']) ? $parts['port'] : 80;
|
||||||
|
$argyle = @ fsockopen( $parts['host'], $port, $errno, $errstr, 0.01 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $argyle )
|
if ( $argyle )
|
||||||
|
|
Loading…
Reference in New Issue