[-] BO: Fix PHP notice on ob_clean if no buffer to delete

This commit is contained in:
Rémi Gaillard
2013-02-22 10:47:00 +01:00
parent f024f14cb7
commit 8653618711
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -81,8 +81,9 @@ class PDFCore
if ($render)
{
// clean the output buffer to avoid random bugs with tcpdf
@ob_end_clean(); //if you change zlib output compression setting in between ob_start and ob_end_clean or ob_end_flush, you will get an error
// clean the output buffer
if (ob_get_level() && ob_get_length() > 0)
ob_clean();
return $this->pdf_renderer->render($this->filename, $display);
}
}