]> granicus.if.org Git - php/commitdiff
- Opss, restore old behavior
authorFelipe Pena <felipe@php.net>
Sun, 19 Jun 2011 14:50:44 +0000 (14:50 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 19 Jun 2011 14:50:44 +0000 (14:50 +0000)
ext/standard/file.c

index 6b6ddde5035a2650f989e55a4ffe8a580426ec65..bcac3c75eb493350e5b5ea97e4f619b478019035 100644 (file)
@@ -1414,15 +1414,15 @@ PHP_FUNCTION(umask)
        long arg1 = 0;
        int oldumask;
        
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &arg1) == FAILURE) {
-               RETURN_FALSE;
-       }
-
        oldumask = umask(077);
 
        if (BG(umask) == -1) {
                BG(umask) = oldumask;
        }
+       
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &arg1) == FAILURE) {
+               RETURN_FALSE;
+       }
 
        if (ZEND_NUM_ARGS() == 0) {
                umask(oldumask);