]> granicus.if.org Git - php/commitdiff
fix #40606 (umask is not being restored when request is finished)
authorAntony Dovgal <tony2001@php.net>
Fri, 23 Feb 2007 16:21:31 +0000 (16:21 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 23 Feb 2007 16:21:31 +0000 (16:21 +0000)
ext/standard/file.c

index b4471d2d79f2b8c3bf4305a59c3d298e96c20491..664e4da72d498b511022aefadfd87983273f5b1c 100644 (file)
@@ -1581,7 +1581,7 @@ PHP_FUNCTION(umask)
 
        oldumask = umask(077);
 
-       if (BG(umask) != -1) {
+       if (BG(umask) == -1) {
                BG(umask) = oldumask;
        }