Skip to content

Commit

Permalink
Correct usage of ob_end_clean and ob_get_contents
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jun 18, 2012
1 parent ded256c commit 4886150
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion libraries/Error_Handler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ public function getDispErrors()
} else {
ob_start();
var_dump($error);
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();
}
}
} else {
Expand Down
6 changes: 4 additions & 2 deletions libraries/Footer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ private function _getDebugMessage()

ob_start();
print_r($_SESSION['debug']);
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();

$retval .= '</pre>';
$retval .= '</div>';
Expand Down Expand Up @@ -322,7 +323,8 @@ public function getDisplay()
if (file_exists(CUSTOM_FOOTER_FILE)) {
ob_start();
include CUSTOM_FOOTER_FILE;
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();
}
} else if (! $this->_isAjax) {
$retval .= "</body></html>";
Expand Down
3 changes: 2 additions & 1 deletion libraries/Header.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ public function getDisplay()
if (file_exists(CUSTOM_HEADER_FILE)) {
ob_start();
include CUSTOM_HEADER_FILE;
$retval .= ob_end_clean();
$retval .= ob_get_contents();
ob_end_clean();
}
// offer to load user preferences from localStorage
if ($this->_userprefsOfferImport) {
Expand Down

0 comments on commit 4886150

Please sign in to comment.