-
Notifications
You must be signed in to change notification settings - Fork 119
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
[false-positive] mkdir race conditions with literal and/or #23
Comments
Thanks for reporting, @marcelloh . False-positive is confirmed, I will ping you when it fixed. |
@kalessil I have false-positive for following code: public function makeDir($path, $chmod = 0777)
{
return is_dir($path) || @mkdir($path, $chmod, true) || is_dir($path);
} PS. And there is a conflict with "This condition is duplicated in other if/elseif branch" for similar code: if (!is_dir($destDir) && !@mkdir($destDir, 0755, true) && !is_dir($destDir)) {
trigger_error("Cannot create directory $destDir");
} |
somehow when the order is the "adviced order" But when I change the order into: |
@dryabov Why you are using |
Fixed in 2.3.10, which I releasing today evening. |
if (!@mkdir($dir, 0777, true) and !is_dir($dir))
which is the same as
if (!@mkdir($dir, 0777, true) && !is_dir($dir))
but I use the more readable
and
.But it blames me for the wrong reasons :-(
The text was updated successfully, but these errors were encountered: