Skip to content

Commit

Permalink
Replace usage of str_starts_with in Page.php::isFpdf (#486)
Browse files Browse the repository at this point in the history
* Replace usage of str_starts_with in Page.php::isFpdf

Fixes #483 reported by @dpanzer.

* Page.php: Added missing )

* Update Page.php
  • Loading branch information
k00ni authored Nov 22, 2021
1 parent c2c1179 commit a216ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Smalot/PdfParser/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function isFpdf(): bool
{
if (\array_key_exists('Producer', $this->document->getDetails()) &&
\is_string($this->document->getDetails()['Producer']) &&
str_starts_with($this->document->getDetails()['Producer'], 'FPDF')) {
0 === strncmp($this->document->getDetails()['Producer'], 'FPDF', 4)) {
return true;
}

Expand Down

0 comments on commit a216ccd

Please sign in to comment.