Skip to content

Conversation

@arshidkv12
Copy link
Contributor

Add proper validation for the flag argument in posix_access().

echo "File exists OK\n";
}

unlink($testfile);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually more appropriate to put such operations in a CLEAN section.

Copy link
Member

@devnexen devnexen Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also $testfile is very probably undefined at this stage.

unlink($testfile);
$dir = __DIR__;
$testfile = "$dir/testfile.txt";
if (file_exists($testfile)) {
Copy link
Member

@devnexen devnexen Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably simplify with just @unlink($testfile);
note: no need to rush committing after every comment ;) kind of burden the CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants