Open matthieusieben opened 11 years ago
The HTML header was sent every time r()
was called (not sure exactly why). Was this the issue? I've added an ob_get_length()
check so no HTTP headers and <html>
headers will be sent if the internal buffer has content in it.
You should make your own wrapper function and register it with ref::config('shortcutFunc', 'yourFn');
if you need further control over this.
I use output buffering to render and cache different parts of a website. Because of that, no headers are sent before everything is rendered. This is detected by
headers_sent()
returningtrue
inref.php:43
and causesr()
to send the headers every time is is called.For that reason I replaced line 43 by:
if(!headers_sent() && ob_get_level() == 0)
This may not be the best solution (which woud require to check every output buffer's length) but it did the trick for me (I don't use
r()
before content was sent to the browser).