]> 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 3fe4ef69ea510af6ca950efe6f45e61a67e22dec..0d6f7cf5ce496f811c05c16a54f59008def46547 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);