Ticket #3765: cron.php.diff
| File cron.php.diff, 1.3 kB (added by dragonhard, 2 years ago) |
|---|
-
wp-includes/cron.php
old new 54 54 55 55 function wp_clear_scheduled_hook( $hook ) { 56 56 $args = array_slice( func_get_args(), 1 ); 57 57 58 58 while ( $timestamp = wp_next_scheduled( $hook, $args ) ) 59 59 wp_unschedule_event( $timestamp, $hook, $args ); 60 60 } … … 73 73 74 74 function spawn_cron() { 75 75 $crons = _get_cron_array(); 76 76 77 77 if ( !is_array($crons) ) 78 78 return; 79 79 80 80 $keys = array_keys( $crons ); 81 81 if ( array_shift( $keys ) > time() ) 82 82 return; … … 85 85 $parts = parse_url( $cron_url ); 86 86 87 87 $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 ); 88 89 if($parts['scheme']=='https' && version_compare(phpversion(), '4.3.0', '<')) 90 { 91 return false; 92 } 93 if($parts['scheme']=='https'){ 94 $argyle = @ fsockopen('ssl://'.$parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01); 95 } else { 96 $argyle = @ fsockopen($parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01); 97 } 98 88 99 if ( $argyle ) 89 100 fputs( $argyle, 90 101 "GET {$parts['path']}?check=" . md5(DB_PASS . '187425') . " HTTP/1.0\r\n" … … 98 109 return; 99 110 100 111 $crons = _get_cron_array(); 101 112 102 113 if ( !is_array($crons) ) 103 114 return; 104 115
