Make WordPress Core

Changeset 5972


Ignore:
Timestamp:
08/29/2007 05:57:06 PM (17 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cron.php

    r5700 r5972  
    8888        // support for SSL was added in 4.3.0
    8989        if (version_compare(phpversion(), '4.3.0', '>=') && function_exists('openssl_open')) {
    90             $argyle = @fsockopen('ssl://' . $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01);
     90            $port = isset($parts['port']) ? $parts['port'] : 443;
     91            $argyle = @fsockopen('ssl://' . $parts['host'], $port, $errno, $errstr, 0.01);
    9192        } else {
    9293            return false;
    9394        }
    9495    } else {
    95         $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 );
     96        $port = isset($parts['port']) ? $parts['port'] : 80;
     97        $argyle = @ fsockopen( $parts['host'], $port, $errno, $errstr, 0.01 );
    9698    }
    9799
Note: See TracChangeset for help on using the changeset viewer.