Skip to content

Commit b3d16a2

Browse files
committed
Explicit check for pdfexport
1 parent 0e31bdb commit b3d16a2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

application/controllers/ReportController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Exception;
99
use Icinga\Application\Hook;
1010
use Icinga\Application\Hook\PdfexportHook;
11+
use Icinga\Application\Modules\Module;
1112
use Icinga\Module\Pdfexport\ProvidedHook\Pdfexport;
1213
use Icinga\Module\Reporting\Database;
1314
use Icinga\Module\Reporting\Model;
@@ -246,6 +247,9 @@ public function downloadAction(): void
246247
switch ($type) {
247248
case 'pdf':
248249
// TODO: Remove this once the dependency on the Pdfexport module is removed
250+
if (Module::exists('pdfexport')) {
251+
throw new Exception('The pdfexport module is not installed');
252+
}
249253
$exporter = method_exists(PdfexportHook::class, 'first')
250254
? PdfexportHook::first()
251255
: Pdfexport::first();

0 commit comments

Comments
 (0)