From: Felipe Pena Date: Sun, 19 Jun 2011 14:50:44 +0000 (+0000) Subject: - Opss, restore old behavior X-Git-Tag: php-5.5.0alpha1~1909 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3276cc4f7a7673549a44b7210184f53653f95d72;p=php - Opss, restore old behavior --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 3fe4ef69ea..0d6f7cf5ce 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -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);