diff --git a/wp-includes/cron.php b/wp-includes/cron.php index b4af252161..34e671dade 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -83,8 +83,18 @@ function spawn_cron() { $cron_url = get_option( 'siteurl' ) . '/wp-cron.php'; $parts = parse_url( $cron_url ); - - $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 ); + + if ($parts['scheme'] == 'https') { + // support for SSL was added in 4.3.0 + if (version_compare(phpversion(), '4.3.0', '>=')) { + $argyle = @fsockopen('ssl://' . $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01); + } else { + return false; + } + } else { + $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 ); + } + if ( $argyle ) fputs( $argyle, "GET {$parts['path']}?check=" . md5(DB_PASS . '187425') . " HTTP/1.0\r\n"