. Fixed bug #77589 (Core dump using parse_ini_string with numeric sections).
(Laruence)
+- COM:
+ . Fixed bug #77621 (Already defined constants are not properly reported).
+ (cmb)
+
- PDO_OCI:
. Support Oracle Database tracing attributes ACTION, MODULE,
CLIENT_INFO, and CLIENT_IDENTIFIER. (Cameron Porter)
SysFreeString(bstr_ids);
/* sanity check for the case where the constant is already defined */
+ php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
if ((exists = zend_get_constant(c.name)) != NULL) {
- if (COMG(autoreg_verbose) && !compare_function(&results, &c.value, exists)) {
- php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", c.name);
+ if (COMG(autoreg_verbose) && !compare_function(&results, &value, exists)) {
+ php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", ZSTR_VAL(c.name));
}
zend_string_release(c.name);
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
}
/* register the constant */
- php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
if (Z_TYPE(value) == IS_LONG) {
c.flags = mode;
ZVAL_LONG(&c.value, Z_LVAL(value));
--- /dev/null
+--TEST--
+Bug #77621 (Already defined constants are not properly reported)
+--SKIPIF--
+<?php
+if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
+?>
+--INI--
+com.autoregister_verbose=1
+--FILE--
+<?php
+define('ADSTYPE_INVALID', 0);
+$root = dirname(array_change_key_case($_SERVER, CASE_UPPER)['COMSPEC']);
+com_load_typelib("$root\activeds.tlb");
+?>
+===DONE===
+--EXPECTF--
+Warning: com_load_typelib(): Type library constant ADSTYPE_INVALID is already defined in %s on line %d
+===DONE===