diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f0f8e0037c1..cd24c348232 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(); } }