Skip to content

Commit 655607d

Browse files
authored
Merge pull request #251 from Setasign/development
Development
2 parents 388c51e + 0b1a6ac commit 655607d

7 files changed

Lines changed: 73 additions & 19 deletions

File tree

.github/workflows/code-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: composer update --dev --no-interaction --prefer-dist --no-progress --no-suggest --ansi
3939

4040
- name: Require phpstan
41-
run: composer require --dev phpstan/phpstan --no-interaction
41+
run: composer require --dev phpstan/phpstan:"~2.1.56" --no-interaction
4242

4343
- name: Run phpstan
4444
run: php ./vendor/phpstan/phpstan/phpstan.phar analyse --no-progress

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"require-dev": {
4040
"phpunit/phpunit": "^8.5.52",
41-
"setasign/fpdf": "~1.8.6",
41+
"setasign/fpdf": "^1.9.0",
4242
"tecnickcom/tcpdf": "^6.8",
4343
"setasign/tfpdf": "~1.33",
4444
"squizlabs/php_codesniffer": "^3.5"
@@ -47,5 +47,9 @@
4747
"psr-4": {
4848
"setasign\\Fpdi\\": "tests/"
4949
}
50+
},
51+
"scripts": {
52+
"all-tests": "@php vendor/bin/phpunit",
53+
"cs": "@php vendor/bin/phpcs"
5054
}
5155
}

composer.lock

Lines changed: 60 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Fpdi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ class Fpdi extends FpdfTpl
3030
*
3131
* @string
3232
*/
33-
const VERSION = '2.6.6';
33+
const VERSION = '2.6.7';
3434
}

src/PdfParser/CrossReference/CrossReference.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,16 @@ public function __construct(PdfParser $parser, $fileHeaderOffset = 0)
8484
$this->readers[] = $reader;
8585

8686
if (isset($trailer->value['Prev'])) {
87-
$nextOffset = $trailer->value['Prev']->value;
88-
if (!\in_array($nextOffset, $offsets, true)) {
89-
$offsets[] = $nextOffset;
90-
$offset = $nextOffset;
91-
} else {
87+
$offset = $trailer->value['Prev']->value;
88+
if (\in_array($offset, $offsets, true)) {
9289
throw new CrossReferenceException(
9390
'Cross-references includes cyclic structure.',
9491
CrossReferenceException::CYCLIC_STRUCTURE
9592
);
9693
}
94+
$offsets[] = $offset;
9795
} else {
98-
$offset = false;
96+
break;
9997
}
10098
}
10199

src/Tcpdf/Fpdi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Fpdi extends \TCPDF
4646
*
4747
* @string
4848
*/
49-
const VERSION = '2.6.6';
49+
const VERSION = '2.6.7';
5050

5151
/**
5252
* A counter for template ids.

src/Tfpdf/Fpdi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ class Fpdi extends FpdfTpl
2828
*
2929
* @string
3030
*/
31-
const VERSION = '2.6.6';
31+
const VERSION = '2.6.7';
3232
}

0 commit comments

Comments
 (0)