php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77621 Already defined constants are not properly reported
Submitted: 2019-02-14 23:12 UTC Modified: 2019-02-14 23:12 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: COM related
PHP Version: 7.2.15 OS: Windows
Private report: No CVE-ID: None
 [2019-02-14 23:12 UTC] cmb@php.net
Description:
------------
When a typelib is imported which defines a constant which has
already been defined, the COM extension is supposed to report
this, if com.autoregister_verbose is enabled and the imported
constant has the same value as the already defined constant.  This
(usually) does not happen, though.


Test script:
---------------
<?php
ini_set('com.autoregister_verbose', 1);
define('ADSTYPE_INVALID', 0);
$root = dirname(array_change_key_case($_SERVER, CASE_UPPER)['COMSPEC']);
com_load_typelib("$root\activeds.tlb");
echo "---DONE---\n";

Expected result:
----------------
Warning: com_load_typelib(): Type library constant ADSTYPE_INVALID is already defined in %s on line %d
---DONE---

Actual result:
--------------
---DONE---

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-14 23:12 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2019-02-14 23:40 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=de738496c2c323b580d9aff0f121876e4101a910
Log: Fix #77621: Already defined constants are not properly reported
 [2019-02-14 23:40 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu May 23 08:01:29 2019 UTC