mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-21 22:49:39 +01:00
Problem with imagekeys undefined or unlinked
PR #136 removed problem with undefined `$imagekeys`, but the solution skipped cleaning files in `$imagekeys`. The problem about this is that `_destroy` function is called 3 times (from `Close` function, as `shutdown_handler` and from `__desctruct` function). Only first time is called as `destroyall == false`, but unset `$imagekeys`. My solution is to preserve `$imagekeys` to be cleaned by call with `$imagekeys == true`.
This commit is contained in:
parent
9fde7bb9b4
commit
7dbdfa4051
@ -7796,10 +7796,8 @@ class TCPDF {
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
foreach($this->imagekeys as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
$preserve = array(
|
||||
@ -7809,6 +7807,7 @@ class TCPDF {
|
||||
'bufferlen',
|
||||
'buffer',
|
||||
'cached_files',
|
||||
'imagekeys',
|
||||
'sign',
|
||||
'signature_data',
|
||||
'signature_max_length',
|
||||
|
Loading…
x
Reference in New Issue
Block a user