diff options
Diffstat (limited to 'ext/standard/info.c')
| -rw-r--r-- | ext/standard/info.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index 24ea0fe6ab..0e4b5da941 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -962,17 +962,12 @@ void register_phpinfo_constants(INIT_FUNC_ARGS) Output a page of useful information about PHP and the current request */ PHP_FUNCTION(phpinfo) { - int argc = ZEND_NUM_ARGS(); - long flag; + long flag = PHP_INFO_ALL; - if (zend_parse_parameters(argc TSRMLS_CC, "|l", &flag) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { return; } - if(!argc) { - flag = PHP_INFO_ALL; - } - /* Andale! Andale! Yee-Hah! */ php_output_start_default(TSRMLS_C); php_print_info(flag TSRMLS_CC); @@ -1011,17 +1006,12 @@ PHP_FUNCTION(phpversion) Prints the list of people who've contributed to the PHP project */ PHP_FUNCTION(phpcredits) { - int argc = ZEND_NUM_ARGS(); - long flag; + long flag = PHP_CREDITS_ALL; - if (zend_parse_parameters(argc TSRMLS_CC, "|l", &flag) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { return; } - if(!argc) { - flag = PHP_CREDITS_ALL; - } - php_print_credits(flag TSRMLS_CC); RETURN_TRUE; } @@ -1120,7 +1110,7 @@ PHP_FUNCTION(php_sapi_name) PHP_FUNCTION(php_uname) { char *mode = "a"; - int modelen; + int modelen = sizeof("a")-1; char *tmp; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &mode, &modelen) == FAILURE) { |
