// We should not sent a redirect if headers are already sent
if (!headers_sent()) {
- // Clear output buffer
- clearOutputBuffer();
-
- // Clear own output buffer
- $GLOBALS['output'] = '';
-
- // To make redirects working (no content type), output mode must be raw
- setOutputMode(-1);
-
// Load URL when headers are not sent
sendRawRedirect(doFinalCompilation(str_replace('&', '&', $url), false));
} else {