Take port into consideration when spawning cron. Props bchecketts. fixes #4782

git-svn-id: https://develop.svn.wordpress.org/trunk@5972 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-08-29 17:57:06 +00:00
parent e419eaa9d3
commit 6fc09cfd3b

View File

@ -87,12 +87,14 @@ function spawn_cron() {
if ($parts['scheme'] == 'https') {
// support for SSL was added in 4.3.0
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 {
return false;
}
} 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 )