Skip to content
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

Don't try to create a directory that already exists #572

Merged
merged 1 commit into from Jul 7, 2021
Merged

Don't try to create a directory that already exists #572

merged 1 commit into from Jul 7, 2021

Conversation

PrinsFrank
Copy link
Contributor

When creating directories, whenever those already exist mkdir is still called and reports an E_WARNING. Although it is supressed, those still end up in the error handler.

When this PR is merged, directories are checked first for existence. If so, mkdir is not called anymore, not triggering the E_WARNING.

@PrinsFrank
Copy link
Contributor Author

Related to phpstan/phpstan#5204 and phpstan/phpstan#4309

@ondrejmirtes
Copy link
Member

Hi, thanks, this looks harmless so I can merge it.

@ondrejmirtes ondrejmirtes merged commit 2a1597b into phpstan:master Jul 7, 2021
@PrinsFrank PrinsFrank deleted the dont-create-directory-when-already-existing branch July 7, 2021 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants