summaryrefslogtreecommitdiffstats
path: root/wp-includes/cron.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/cron.php')
-rw-r--r--wp-includes/cron.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/wp-includes/cron.php b/wp-includes/cron.php
index f81c6ad..1c17c76 100644
--- a/wp-includes/cron.php
+++ b/wp-includes/cron.php
@@ -83,18 +83,20 @@ function spawn_cron() {
$cron_url = get_option( 'siteurl' ) . '/wp-cron.php';
$parts = parse_url( $cron_url );
-
+
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 )
fputs( $argyle,
"GET {$parts['path']}?check=" . wp_hash('187425') . " HTTP/1.0\r\n"