cvs: php4 /ext/standard dir.c

From: Date: Sun, 30 Dec 2001 09:50:41 +0000
Subject: cvs: php4 /ext/standard dir.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8859@lists.php.net to get a copy of this message
zak Sun Dec 30 04:50:41 2001 EDT Modified files: /php4/ext/standard dir.c Log: chroot: corrected prototype, converted to zend_parse_parameters Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.81 php4/ext/standard/dir.c:1.82 --- php4/ext/standard/dir.c:1.81 Tue Dec 11 10:30:28 2001 +++ php4/ext/standard/dir.c Sun Dec 30 04:50:41 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.81 2001/12/11 15:30:28 sebastian Exp $ */ +/* $Id: dir.c,v 1.82 2001/12/30 09:50:41 zak Exp $ */ /* {{{ includes/startup/misc */ @@ -222,20 +222,18 @@ /* }}} */ #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC -/* {{{ proto int chroot(string directory) +/* {{{ proto bool chroot(string directory) Change root directory */ PHP_FUNCTION(chroot) { - pval **arg; - int ret; + char *str; + int ret, str_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) { + RETURN_FALSE; } - convert_to_string_ex(arg); - - ret = chroot(Z_STRVAL_PP(arg)); + ret = chroot(str); if (ret != 0) { php_error(E_WARNING, "chroot: %s (errno %d)", strerror(errno), errno);

« previous php.cvs (#8859) next »