This was first reported as part of #962958: Run cron in a separate process to avoid a response delay but it should be its own issue.
If the automated cron feature is being used and the cron run results in an exception or error, then the user who hits the page triggering the cron run can get an entire, second error page output to the browser, at the bottom of the normal page.
To fix this, I think that in drupal_page_footer(), right after content is flushed to the browser we need to set some parameter that tells _drupal_log_error() to exit the page request after logging any errors it receives. We should never print them to the screen, because the automated cron run is something that happens in the background and not something the user who happened to trigger it ever needs to know about.
Comments
Comment #1
dddave commentedComment #10
catchAutomated cron runs in the terminate event, which is after the page has been sent to the browser, so it shouldn't be possible to cause the double-rendering any more. Marking outdated.