1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00

- 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
This commit is contained in:
Andrei Zmievski
2006-07-17 19:32:10 +00:00
parent dfb113bbd2
commit 0bb270d352

View File

@@ -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();
}
}