// 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 {
* @access private
*/
function sendRawRedirect ($url) {
+ // Clear output buffer
+ clearOutputBuffer();
+
+ // Clear own output buffer
+ $GLOBALS['output'] = '';
+
+ // To make redirects working (no content type), output mode must be raw
+ setOutputMode(-1);
+
// Send helping header
setHttpStatus('302 Found');