Skip to content

Commit

Permalink
Fixed: null check for PHP 8.1 (#476)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicola Asuni <[email protected]>
  • Loading branch information
ksd-krauzand and nicolaasuni authored Aug 12, 2022
1 parent 5596537 commit 633b42a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -7636,7 +7636,7 @@ public function Output($name='doc.pdf', $dest='I') {
$dest = $dest ? 'D' : 'F';
}
$dest = strtoupper($dest);
if ($dest[0] != 'F') {
if ($dest[0] != 'F' && $name !== null) {
$name = preg_replace('/[\s]+/', '_', $name);
$name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name);
}
Expand Down

0 comments on commit 633b42a

Please sign in to comment.