diff --git a/src/Smalot/PdfParser/PDFObject.php b/src/Smalot/PdfParser/PDFObject.php index 8d1d14de..69e2120b 100644 --- a/src/Smalot/PdfParser/PDFObject.php +++ b/src/Smalot/PdfParser/PDFObject.php @@ -689,7 +689,7 @@ public function getTextArray(?Page $page = null): array $xobject = $page->getXObject($id); // @todo $xobject could be a ElementXRef object, which would then throw an error - if (\is_object($xobject) && $xobject instanceof self && !\in_array($xobject->getUniqueId(), self::$recursionStack)) { + if (\is_object($xobject) && $xobject instanceof self && !\in_array($xobject->getUniqueId(), self::$recursionStack, true)) { // Not a circular reference. $text[] = $xobject->getText($page); } diff --git a/src/Smalot/PdfParser/RawData/RawDataParser.php b/src/Smalot/PdfParser/RawData/RawDataParser.php index 6b04fae5..3d746caf 100644 --- a/src/Smalot/PdfParser/RawData/RawDataParser.php +++ b/src/Smalot/PdfParser/RawData/RawDataParser.php @@ -127,7 +127,7 @@ protected function decodeStream(string $pdfData, array $xref, array $sdic, strin // decode the stream $remaining_filters = []; foreach ($filters as $filter) { - if (\in_array($filter, $this->filterHelper->getAvailableFilters())) { + if (\in_array($filter, $this->filterHelper->getAvailableFilters(), true)) { try { $stream = $this->filterHelper->decodeFilter($filter, $stream, $this->config->getDecodeMemoryLimit()); } catch (\Exception $e) {