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 9909136
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Processor/Gotenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ 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 9909136

Please sign in to comment.