From: Felipe Pena Date: Sun, 19 Jun 2011 14:50:44 +0000 (+0000) Subject: - Opss, restore old behavior X-Git-Tag: php-5.4.0alpha1~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=868b808f4c2abb723eecba1825dea25648902dc2;p=php - Opss, restore old behavior --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 6b6ddde503..bcac3c75eb 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);