-
Notifications
You must be signed in to change notification settings - Fork 437
Fix: reset temporaryFiles array in finally block #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -861,6 +861,8 @@ public function testCleanupEmptyTemporaryFiles(): void | |
|
|
||
| $remove = new ReflectionMethod($generator, 'removeTemporaryFiles'); | ||
| $remove->invoke($generator); | ||
|
|
||
| $this->assertCount(0, $files->getValue($generator)); | ||
|
||
| } | ||
|
|
||
| public function testleanupTemporaryFiles(): void | ||
|
|
@@ -887,6 +889,8 @@ public function testleanupTemporaryFiles(): void | |
|
|
||
| $remove = new ReflectionMethod($generator, 'removeTemporaryFiles'); | ||
| $remove->invoke($generator); | ||
|
|
||
| $this->assertCount(0, $files->getValue($generator)); | ||
| } | ||
|
|
||
| public function testResetOptions(): void | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It think it would be preferable to notify the file wasn't delete. This way we don't try to delete a file that cannot, but the server logs has the informations that the file has not been deleted during this process.
Moreover, I wonder why the
$this->temporaryFilesarray is not clean up after removing all files.Here is a suggestion that should both resolve the conflict (the function was updated for security concerns) and add a log message with the
@trigger_errorcall.What do you think about?