Ticket #11831: wp-cron.php.patch
File wp-cron.php.patch, 1.1 KB (added by , 11 years ago) |
---|
-
wp-cron.php
26 26 require_once( dirname( __FILE__ ) . '/wp-load.php' ); 27 27 } 28 28 29 // catch timeout errors and display a useful error message. 30 function _wp_Cron_Error ($errno, $errstr, $errfile, $errline) { 31 32 if(WP_DEBUG && strrpos($errstr,'fopen')){ 33 echo "WP-CRON failed, most likely due to an error with CURL, try adding \n define('ALTERNATE_WP_CRON', true);\n to wp-config.php in your wordpress directory"; 34 } else { 35 echo "$errno ($errstr) in $errfile at line $errline"; 36 } 37 38 } 39 29 40 // Uncached doing_cron transient fetch 30 41 function _get_cron_lock() { 31 42 global $wpdb; … … 97 108 * @param string $hook Name of the hook that was scheduled to be fired. 98 109 * @param array $v['args'] The arguments to be passed to the hook. 99 110 */ 111 set_error_handler("_wp_Cron_Error"); 100 112 do_action_ref_array( $hook, $v['args'] ); 101 113 restore_error_handler(); 114 102 115 // If the hook ran too long and another cron process stole the lock, quit. 103 116 if ( _get_cron_lock() != $doing_wp_cron ) 104 117 return;