diff --git a/library/Pdfexport/ProvidedHook/Pdfexport.php b/library/Pdfexport/ProvidedHook/Pdfexport.php index 113eff0..c5f8342 100644 --- a/library/Pdfexport/ProvidedHook/Pdfexport.php +++ b/library/Pdfexport/ProvidedHook/Pdfexport.php @@ -9,6 +9,7 @@ use Icinga\Application\Hook; use Icinga\Application\Hook\PdfexportHook; use Icinga\Application\Icinga; +use Icinga\Application\Web; use Icinga\Module\Pdfexport\HeadlessChrome; use Icinga\Module\Pdfexport\PrintableHtmlDocument; use iio\libmergepdf\Driver\TcpdiDriver; @@ -123,7 +124,9 @@ public function streamPdfFromHtml($html, $filename) $pdf = $merger->merge(); } - Icinga::app()->getResponse() + /** @var Web $app */ + $app = Icinga::app(); + $app->getResponse() ->setHeader('Content-Type', 'application/pdf', true) ->setHeader('Content-Disposition', "inline; filename=\"$filename\"", true) ->setBody($pdf)