-
Notifications
You must be signed in to change notification settings - Fork 671
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
Argument 4 of mkdir cannot be null #10796
Comments
I found these snippets: https://psalm.dev/r/6c64902528<?php
mkdir("home/sample", 0755, true, null)
|
You can fix callmap signature in this line: https://github.com/vimeo/psalm/blob/dca888c777aabd07aae4d2dc126cb90c5a432b90/dictionaries/CallMap.php#L6860 |
I found these snippets: https://psalm.dev/r/6c64902528<?php
mkdir("home/sample", 0755, true, null)
|
Note that PHP versions before 7.3 did not accept |
Psalm is reporting the fourth argument of the
mkdir()
function cannot be null, but the function works as expected if used anyway.The full message is:
And can be see with this example:
https://psalm.dev/r/6c64902528
It's difficult to find examples of how this parameter would be used, but PHP does support passing a
null
for this argument. The docs describe it that way as well.https://www.php.net/manual/en/function.mkdir
The text was updated successfully, but these errors were encountered: