Skip to content

prevent unlink errors instead of attempting to suppress them - #48

Merged
sanmai merged 2 commits into
pear:masterfrom
ttgrules:unlink-warnings
Oct 14, 2025
Merged

sanmai merged 2 commits into
pear:masterfrom
ttgrules:unlink-warnings

Conversation

@ttgrules

Copy link
Copy Markdown
Contributor

It is possible to hit the @unlink($this->_tmp_file) in such a way where warning suppression is disabled and $this->_tmp_file does not exist. This will throw an actual warning instead of continuing silently as designed.

An easy fix is to use file_exists to verify the existence of the temp file before unlinking.

…o we need to check file existence before trying to unlink it
@sanmai
sanmai enabled auto-merge (squash) October 14, 2025 12:52
@sanmai
sanmai merged commit 8bb0b9c into pear:master Oct 14, 2025
13 checks passed
@ttgrules
ttgrules deleted the unlink-warnings branch October 14, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants