Inline scripts are considered harmful and therefore blocked by default on sites with an active Content Security Policy, as we happen to have on our site (http://forum.textpattern.com).

As a consequence we experience a white screen of death at the first stage of db_update.php with nothing but "invisible" script and meta tags rendered to the client. The refresh never happens as CSP blocks the inlined script.

We'd love to see a different method of stepping through the update stages with better CSP compatibility, and maybe a bit of minimal visible output to show some indication of progress while the update stages occur.

This function discards the contents of the topmost output buffer and turns off this output buffering. If you want to further process the buffer's contents you have to call ob_get_contents() before ob_end_clean() as the buffer contents are discarded when ob_end_clean() is called.

That's what is used when showing the error() function too.

I get the error at this point:

Is this the amount of posts per page you've set or has it passed multiple pages at this point? - it could just be an issue with the last header.

'Rebuild completed info' => 'Once the process has completed, you will be redirected back to this page. It is highly recommended that you have JavaScript enabled in your browser during rebuilding (for automatic redirect when a cycle has completed). If you are forced to abort the rebuild process, make a note of the last processed post ID and enter that ID+1 in "Starting post ID" when/if you want to continue ("Empty index" must not be selected).',