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:
ryan 2007-08-29 17:57:06 +00:00
parent ad90a8f560
commit 6a0629e717
1 changed files with 4 additions and 2 deletions

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 )