Skip to content

Commit deca36a

Browse files
committed
Fix null array offset in _destroy() for PHP 8.5
1 parent 7a27012 commit deca36a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tcpdf.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7884,6 +7884,9 @@ public function Output($name='doc.pdf', $dest='I') {
78847884
* @since 4.5.016 (2009-02-24)
78857885
*/
78867886
public function _destroy($destroyall=false, $preserve_objcopy=false) {
7887+
if ($this->file_id === null) {
7888+
return;
7889+
}
78877890
if (isset(self::$cleaned_ids[$this->file_id])) {
78887891
$destroyall = false;
78897892
}

0 commit comments

Comments
 (0)