summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index b4471d2d79..664e4da72d 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1581,7 +1581,7 @@ PHP_FUNCTION(umask)
oldumask = umask(077);
- if (BG(umask) != -1) {
+ if (BG(umask) == -1) {
BG(umask) = oldumask;
}