Skip to content

Commit

Permalink
Add method_exists check for gotenberg-php < 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
muratbinerbay committed Jan 30, 2025
1 parent 24efb69 commit 74fcb0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Processor/Gotenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getPdfFromString(string $html, array $params = [], bool $returnF
}

// generateDocumentOutline is only available for gotenberg >= 8.14.0 and gotenberg-php >= v2.10.0
if (isset($params['generateDocumentOutline']) && $params['generateDocumentOutline']) {
if (isset($params['generateDocumentOutline']) && $params['generateDocumentOutline'] && method_exists($chromium, 'generateDocumentOutline')) {
$chromium->generateDocumentOutline();
}

Expand Down

0 comments on commit 74fcb0e

Please sign in to comment.