Don't treat strings containing : as potential constant names in

the .ini parser.
This fixes Bug #26893
This commit is contained in:
Wez Furlong 2004-01-13 17:00:10 +00:00
parent c205153a0a
commit d4deb460bd

View File

@ -98,7 +98,8 @@ void zend_ini_get_constant(zval *result, zval *name)
zval z_constant;
TSRMLS_FETCH();
if (zend_get_constant(name->value.str.val, name->value.str.len, &z_constant TSRMLS_CC)) {
if (!memchr(name->value.str.val, ':', name->value.str.len)
&& zend_get_constant(name->value.str.val, name->value.str.len, &z_constant TSRMLS_CC)) {
/* z_constant is emalloc()'d */
convert_to_string(&z_constant);
result->value.str.val = zend_strndup(z_constant.value.str.val, z_constant.value.str.len);