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

diff --git a/NEWS b/NEWS
index 9dab3f2e77bad680447f80025ea08eeb7e719968..da3f2b68b454b6ba8a268a612ea52ebf4af84ed0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ PHP                                                                        NEWS
 - Added --ri switch to CLI which allows to check extension information. (Marcus)
 - Added tidyNode::getParent() method (John, Nuno)
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
+- Fixed bug #40606 (umask is not being restored when request is finished). 
+  (Tony)
 - Fixed bug #40598 (libxml segfault). (Rob)
 - Fixed bug #40578 (imagettftext() multithreading issue). (Tony, Pierre)
 - Fixed bug #40576 (double values are truncated to 6 decimal digits when 
index 5d2bd6f2ae75aa7165471a8600b042afbcd3a055..993842e17aa2574f8322bb696bfbc09a14a34886 100644 (file)
@@ -1488,7 +1488,7 @@ PHP_FUNCTION(umask)
 
        oldumask = umask(077);
 
-       if (BG(umask) != -1) {
+       if (BG(umask) == -1) {
                BG(umask) = oldumask;
        }