From 0bb270d352d0b4ea4b591ded91af4ef7a3dbf550 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Mon, 17 Jul 2006 19:32:10 +0000 Subject: [PATCH] - Use zend_uchar for param type - %v is for UG() - dependent strings, which is not the case here - 'T' is only useful for multiple parameters, so use 't' instead --- ext/standard/basic_functions.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f0f8e0037c..cd24c34823 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4173,19 +4173,20 @@ PHP_MINFO_FUNCTION(basic) } -/* {{{ proto mixed constant(string const_name) - Given the name of a constant this function will return the constants associated value */ +/* {{{ proto mixed constant(string const_name) U + Given the name of a constant this function will return the constant's associated value */ PHP_FUNCTION(constant) { zstr const_name; - int const_name_len, const_type; + int const_name_len; + zend_uchar const_type; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &const_name, &const_name_len, &const_type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &const_name, &const_name_len, &const_type) == FAILURE) { return; } if (!zend_u_get_constant(const_type, const_name, const_name_len, return_value TSRMLS_CC)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %v", const_name); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %R", const_type, const_name); RETURN_NULL(); } } -- 2.40.0