summaryrefslogtreecommitdiff
path: root/ext/standard/filestat.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-06-06 21:28:16 +0000
committerFelipe Pena <felipe@php.net>2011-06-06 21:28:16 +0000
commit32b5f8a1a3552f48d6e91c17b6d9d441c665a44d (patch)
treea6490eaed671ea190f7876994b35169200ff2df8 /ext/standard/filestat.c
parenta311dc244353f0ed88a273056224ee5c97cc4011 (diff)
downloadphp-git-32b5f8a1a3552f48d6e91c17b6d9d441c665a44d.tar.gz
- Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
Diffstat (limited to 'ext/standard/filestat.c')
-rw-r--r--ext/standard/filestat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 34b6468146..5c4c5d465e 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -235,7 +235,7 @@ PHP_FUNCTION(disk_total_space)
char *path;
int path_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &path, &path_len) == FAILURE) {
return;
}
@@ -370,7 +370,7 @@ PHP_FUNCTION(disk_free_space)
char *path;
int path_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &path_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &path, &path_len) == FAILURE) {
return;
}
@@ -425,7 +425,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
int ret;
php_stream_wrapper *wrapper;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/", &filename, &filename_len, &group) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pz/", &filename, &filename_len, &group) == FAILURE) {
RETURN_FALSE;
}
@@ -556,7 +556,7 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
int ret;
php_stream_wrapper *wrapper;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/", &filename, &filename_len, &user) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pz/", &filename, &filename_len, &user) == FAILURE) {
return;
}
@@ -659,7 +659,7 @@ PHP_FUNCTION(chmod)
mode_t imode;
php_stream_wrapper *wrapper;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &filename, &filename_len, &mode) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pl", &filename, &filename_len, &mode) == FAILURE) {
return;
}
@@ -707,7 +707,7 @@ PHP_FUNCTION(touch)
struct utimbuf *newtime = &newtimebuf;
php_stream_wrapper *wrapper;
- if (zend_parse_parameters(argc TSRMLS_CC, "s|ll", &filename, &filename_len, &filetime, &fileatime) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "p|ll", &filename, &filename_len, &filetime, &fileatime) == FAILURE) {
return;
}
@@ -817,7 +817,7 @@ PHP_FUNCTION(clearstatcache)
char *filename = NULL;
int filename_len = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|bs", &clear_realpath_cache, &filename, &filename_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|bp", &clear_realpath_cache, &filename, &filename_len) == FAILURE) {
return;
}
@@ -1068,7 +1068,7 @@ void name(INTERNAL_FUNCTION_PARAMETERS) { \
char *filename; \
int filename_len; \
\
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { \
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) { \
return; \
} \
\