php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79242 COM error constants don't match com_exception codes on x86
Submitted: 2020-02-07 16:30 UTC Modified: 2020-02-07 16:30 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: COM related
PHP Version: 7.3Git-2020-02-07 (Git) OS: Windows x86
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 10 = ?
Subscribe to this entry?

 
 [2020-02-07 16:30 UTC] cmb@php.net
Description:
------------
All four available COM error constants actually have the value -1,
what makes them indistinguishable, but more importantly makes them
useless for checking com_exception codes; the latter can be seen
when running 27974.phpt, which fails due to this mismatch.


Test script:
---------------
<?php
var_dump(
    DISP_E_DIVBYZERO,
    DISP_E_OVERFLOW,
    DISP_E_BADINDEX,
    MK_E_UNAVAILABLE
);
?>


Expected result:
----------------
int(-2147352558)
int(-2147352566)
int(-2147352565)
int(-2147221021)


Actual result:
--------------
int(-1)
int(-1)
int(-1)
int(-1)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-07 16:30 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-02-07 17:12 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b9738f5802d15ba5d593ae09a6e63e49f9d7880f
Log: Fix #79242: COM error constants don't match com_exception codes
 [2020-02-07 17:12 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 08:01:30 2024 UTC