Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"require": {
"php": "^7.2 || ^8.0",
"php": ">=7.2 <=8.5.99999",
"ext-zlib": "*"
},
"conflict": {
Expand Down
21 changes: 15 additions & 6 deletions src/FpdiTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ protected function setMinPdfVersion($pdfVersion)
* @param array $parserParams Individual parameters passed to the parser instance.
* @return PdfParser|FpdiPdfParser
*/
protected function getPdfParserInstance(StreamReader $streamReader, array $parserParams = [])
{
protected function getPdfParserInstance(
StreamReader $streamReader,
#[\SensitiveParameter]
array $parserParams = []
) {
// note: if you get an exception here - turn off errors/warnings on not found classes for your autoloader.
// psr-4 (https://www.php-fig.org/psr/psr-4/) says: Autoloader implementations MUST NOT throw
// exceptions, MUST NOT raise errors of any level, and SHOULD NOT return a value.
Expand All @@ -149,8 +152,11 @@ protected function getPdfParserInstance(StreamReader $streamReader, array $parse
* @param array $parserParams Individual parameters passed to the parser instance.
* @return string
*/
protected function getPdfReaderId($file, array $parserParams = [])
{
protected function getPdfReaderId(
$file,
#[\SensitiveParameter]
array $parserParams = []
) {
if (\is_resource($file)) {
$id = (string) $file;
} elseif (\is_string($file)) {
Expand Down Expand Up @@ -228,8 +234,11 @@ public function setSourceFile($file)
* @throws PdfParserException
* @throws PdfTypeException
*/
public function setSourceFileWithParserParams($file, array $parserParams = [])
{
public function setSourceFileWithParserParams(
$file,
#[\SensitiveParameter]
array $parserParams = []
) {
$this->currentReaderId = $this->getPdfReaderId($file, $parserParams);
$this->objectsToCopy[$this->currentReaderId] = [];

Expand Down