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

Silent @ operator should use & $errno check #889

Merged
merged 1 commit into from
Dec 27, 2021

Conversation

samsonasik
Copy link
Contributor

@samsonasik
Copy link
Contributor Author

samsonasik commented Dec 27, 2021

@samsonasik
Copy link
Contributor Author

All green 🎉

@ondrejmirtes
Copy link
Member

Can you please explain the behaviour of this code before/after with some examples? Thanks.

@samsonasik
Copy link
Contributor Author

As I commented at rectorphp/rector-src#1577 (review), I tried the code in rector-src, with only check error_reporting() === 0, it will end up getting error:

 [ERROR] Could not process "/Users/samsonasik/www/rector-src/src/Application/FileProcessor.php" file, due to:           
         "mkdir(): File exists". On line: 26     

for the following code:

@mkdir('test');
@mkdir('test');

@ondrejmirtes ondrejmirtes merged commit c6f1cdc into phpstan:master Dec 27, 2021
@ondrejmirtes
Copy link
Member

Thank you!

@samsonasik samsonasik deleted the patch-1 branch December 27, 2021 19:36
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