Skip to content

Commit

Permalink
Don't attempt to blindly flush buffer.
Browse files Browse the repository at this point in the history
This may destroy output buffering e.g. in Horde_View. Only flush buffers if we are sure that content has been sent to the browser already.
  • Loading branch information
yunosh committed Mar 4, 2016
1 parent e234847 commit fe7e6b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/Core/lib/Horde/PageOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,10 @@ public function header(array $opts = array())
// Send what we have currently output so the browser can start
// loading CSS/JS. See:
// http://developer.yahoo.com/performance/rules.html#flush
echo Horde::endBuffer();
flush();
if (Horde::contentSent()) {
echo Horde::endBuffer();
flush();
}
}

/**
Expand Down

0 comments on commit fe7e6b7

Please sign in to comment.