diff options
author | Felipe Pena <felipe@php.net> | 2009-05-07 12:08:09 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2009-05-07 12:08:09 +0000 |
commit | dcfe5d7140ff47bd0104c69150ad23c89378a7e9 (patch) | |
tree | bdf2e47231c079baf056232f5248c57422a785e9 /Zend/zend_builtin_functions.c | |
parent | 4b34028479c596f05df79bf2c8586f9483521007 (diff) | |
download | php-git-dcfe5d7140ff47bd0104c69150ad23c89378a7e9.tar.gz |
- MFH: Parameter parsing changes for get_defined_constants() (Kalle)
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 6f1774de27..4c430274c4 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1805,19 +1805,19 @@ ZEND_FUNCTION(get_loaded_extensions) /* }}} */ -/* {{{ proto array get_defined_constants([mixed categorize]) +/* {{{ proto array get_defined_constants([bool categorize]) Return an array containing the names and values of all defined constants */ ZEND_FUNCTION(get_defined_constants) { - int argc = ZEND_NUM_ARGS(); - - if (argc != 0 && argc != 1) { - ZEND_WRONG_PARAM_COUNT(); + zend_bool categorize = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &categorize) == FAILURE) { + return; } array_init(return_value); - if (argc) { + if (categorize) { HashPosition pos; zend_constant *val; int module_number; |