forked from science-ation/science-ation
only close the image if was opened to begin with
This commit is contained in:
parent
dfa1d438e7
commit
f4bc5ad4c3
6
lpdf.php
6
lpdf.php
@ -306,7 +306,11 @@ class lpdf
|
||||
function output()
|
||||
{
|
||||
pdf_end_page($this->pdf);
|
||||
pdf_close_image($this->pdf,$this->logoimage);
|
||||
|
||||
//only close the image if it was opened to begin with
|
||||
if($this->logoimage)
|
||||
pdf_close_image($this->pdf,$this->logoimage);
|
||||
|
||||
pdf_close($this->pdf);
|
||||
$pdfdata=pdf_get_buffer($this->pdf);
|
||||
header("Content-type: application/pdf");
|
||||
|
Loading…
Reference in New Issue
Block a user