WordPress.org

Make WordPress Core

Changeset 4980


Ignore:
Timestamp:
03/07/07 01:47:57 (8 years ago)
Author:
ryan
Message:

Fix spawning with SSL. Props dragonhard and rob1n. fixes #3765

File:
1 edited

Legend:

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

    r4953 r4980  
    8484    $cron_url = get_option( 'siteurl' ) . '/wp-cron.php'; 
    8585    $parts = parse_url( $cron_url ); 
    86  
    87     $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 ); 
     86     
     87    if ($parts['scheme'] == 'https') { 
     88        // support for SSL was added in 4.3.0 
     89        if (version_compare(phpversion(), '4.3.0', '>=')) { 
     90            $argyle = @fsockopen('ssl://' . $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01); 
     91        } else { 
     92            return false; 
     93        } 
     94    } else { 
     95        $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 ); 
     96    } 
     97     
    8898    if ( $argyle ) 
    8999        fputs( $argyle, 
Note: See TracChangeset for help on using the changeset viewer.