#31424 [NEW]: Make mode optional on mkdir
| From: | aidan@php.net | Date: | Thu, 06 Jan 2005 02:07:54 +0000 |
| Subject: | #31424 [NEW]: Make mode optional on mkdir | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-71511@lists.php.net to get a copy of this message | ||
From: aidan@php.net
Operating system:
PHP version: 5CVS-2005-01-06 (dev)
PHP Bug Type: Feature/Change Request
Bug description: Make mode optional on mkdir
Description:
------------
As all but the first parameter of mkdir are optional and non sequential,
it makes sense to be able to pass NULL to each if a later param is
required.
E.g. mkdir('some/path/foobar', null, true);
Reproduce code:
---------------
This patch adds this functionality:
http://rafb.net/paste/results/0QWc5F15.html
Included in the report:
--- \repository\php-src\ext\standard\file.1.395.c Mon Dec 13 10:21:53
2004
+++ \repository\php-src\ext\standard\file.c Thu Jan 06 12:29:41 2005
@@ -1372,7 +1372,7 @@
char *dir;
php_stream_context *context;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lbr", &dir,
&dir_len, &mode, &recursive, &zcontext) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|!lbr", &dir,
&dir_len, &mode, &recursive, &zcontext) == FAILURE) {
RETURN_FALSE;
}
--
Edit bug report at http://bugs.php.net/?id=31424&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31424&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31424&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31424&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31424&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31424&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31424&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31424&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31424&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31424&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31424&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31424&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31424&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31424&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31424&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31424&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31424&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31424&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31424&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31424&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31424&r=mysqlcfg