summaryrefslogtreecommitdiff
path: root/ext/standard/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/info.c')
-rw-r--r--ext/standard/info.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c
index c2e435129d..2f21bd79fc 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -1001,17 +1001,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_start_ob_buffer(NULL, 4096, 0 TSRMLS_CC);
php_print_info(flag TSRMLS_CC);
@@ -1052,17 +1047,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;
}
@@ -1164,7 +1154,7 @@ PHP_FUNCTION(php_sapi_name)
PHP_FUNCTION(php_uname)
{
char *mode = "a";
- int modelen;
+ int modelen = sizeof("a")-1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &mode, &modelen) == FAILURE) {
return;
}