From a627133b15aac20703d5fe82a7f1388225b6b00e Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 12 Mar 2011 15:07:31 +0100 Subject: [ticket/10046] Remove register_shutdown_function() in cron.php from develop. PHPBB3-10046 --- phpBB/cron.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'phpBB/cron.php') diff --git a/phpBB/cron.php b/phpBB/cron.php index 6de493f0bf..cc5964218a 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -62,14 +62,11 @@ function do_cron($cron_lock, $run_tasks) if ($config['use_system_cron']) { - $use_shutdown_function = false; - $cron = new phpbb_cron_manager($phpbb_root_path . 'includes/cron/task', $phpEx, $cache->get_driver()); } else { $cron_type = request_var('cron_type', ''); - $use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false; // Comment this line out for debugging so the page does not return an image. output_image(); @@ -95,22 +92,12 @@ if ($cron_lock->acquire()) } if ($task->is_ready()) { - if ($use_shutdown_function && !$task->is_shutdown_function_safe()) - { - $use_shutdown_function = false; - } $run_tasks = array($task); } } } - if ($use_shutdown_function) - { - register_shutdown_function('do_cron', $cron_lock, $run_tasks); - } - else - { - do_cron($cron_lock, $run_tasks); - } + + do_cron($cron_lock, $run_tasks); } else { -- cgit v1.2.1